use of org.jpos.iso.ISOMsg 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.ISOMsg 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.ISOMsg in project jPOS by jpos.
the class MSGTEST1Test method testValidate1.
@Test
public void testValidate1() throws Throwable {
ISOVMsg result = (ISOVMsg) new MSGTEST().validate(new ISOMsg("testMSGTESTMti"));
assertNotNull("result", result);
}
use of org.jpos.iso.ISOMsg in project jPOS by jpos.
the class VErrorParserTest method testGetVErrorsThrowsNullPointerException1.
@Test
public void testGetVErrorsThrowsNullPointerException1() throws Throwable {
VErrorParser vErrorParser = new VErrorParser();
try {
vErrorParser.getVErrors(new ISOVMsg(new ISOMsg(), null));
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.iso.ISOMsg in project jPOS by jpos.
the class VErrorParserTest method testGetVErrorsThrowsNullPointerException.
@Test
public void testGetVErrorsThrowsNullPointerException() throws Throwable {
VErrorParser vErrorParser = new VErrorParser();
ISOVMsg c = new ISOVMsg(new ISOMsg(), new ISOVError("testVErrorParserDescription"));
c.addISOVError(null);
try {
vErrorParser.getVErrors(c);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
Aggregations