use of org.jpos.iso.ISOComponent in project jPOS by jpos.
the class ISOVException1Test method testConstructor.
@Test
public void testConstructor() throws Throwable {
ISOComponent errComponent = new ISOMsg("testISOVExceptionMti");
ISOVException iSOVException = new ISOVException("testISOVExceptionDescription", errComponent);
assertSame("iSOVException.errComponent", errComponent, iSOVException.errComponent);
assertEquals("iSOVException.getMessage()", "testISOVExceptionDescription", iSOVException.getMessage());
assertFalse("iSOVException.treated", iSOVException.treated);
assertNull("iSOVException.getNested()", iSOVException.getNested());
}
use of org.jpos.iso.ISOComponent in project jPOS by jpos.
the class MSGTEST021Test method testValidateThrowsISOVException1.
@Test
public void testValidateThrowsISOVException1() throws Throwable {
ISOComponent m = new ISOVMsg(new ISOMsg("testMSGTEST02Mti"));
try {
new MSGTEST02(true).validate(m);
fail("Expected ISOVException to be thrown");
} catch (ISOVException ex) {
assertEquals("ex.getMessage()", "Error on msg. ", ex.getMessage());
assertFalse("ex.treated", ex.treated);
assertSame("ex.errComponent", m, ex.errComponent);
assertNull("ex.getNested()", ex.getNested());
}
}
use of org.jpos.iso.ISOComponent in project jPOS by jpos.
the class MSGTEST021Test method testValidateThrowsNullPointerException.
@Test
public void testValidateThrowsNullPointerException() throws Throwable {
ISOMsg Source = new ISOMsg("testMSGTEST02Mti");
Source.setMTI("testMSGTEST02Mti");
Source.setRetransmissionMTI();
ISOComponent m = new ISOVMsg(Source);
try {
new MSGTEST02().validate(m);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.iso.ISOComponent in project jPOS by jpos.
the class MSGTEST1Test method testValidateThrowsISOVException1.
@Test
public void testValidateThrowsISOVException1() throws Throwable {
ISOComponent m = new ISOVMsg(new ISOMsg());
try {
new MSGTEST(true).validate(m);
fail("Expected ISOVException to be thrown");
} catch (ISOVException ex) {
assertEquals("ex.getMessage()", "Error on msg. ", ex.getMessage());
assertFalse("ex.treated", ex.treated);
assertSame("ex.errComponent", m, ex.errComponent);
assertNull("ex.getNested()", ex.getNested());
}
}
use of org.jpos.iso.ISOComponent in project jPOS by jpos.
the class VErrorParserTest method testGetVErrors4.
@SuppressWarnings("unchecked")
@Test
public void testGetVErrors4() throws Throwable {
VErrorParser vErrorParser = new VErrorParser();
ISOComponent c = new ISOMsg();
Vector result = vErrorParser.getVErrors(c);
assertEquals("(ISOMsg) c.getMaxField()", 0, c.getMaxField());
assertEquals("result.size()", 0, result.size());
}
Aggregations