use of org.jpos.iso.ISOVMsg in project jPOS by jpos.
the class ISOBaseValidatingPackagerTest method testValidate13.
@Test
public void testValidate13() throws Throwable {
ISOBaseValidator[] msgVlds = new ISOBaseValidator[1];
msgVlds[0] = new MSGTEST02();
ISOValidator[] fvlds = new ISOFieldValidator[1];
ISOBaseValidatingPackager iSOBaseValidatingPackager = new ISOBaseValidatingPackager();
iSOBaseValidatingPackager.setFieldValidator(fvlds);
iSOBaseValidatingPackager.setMsgValidator(msgVlds);
ISOVMsg result = (ISOVMsg) iSOBaseValidatingPackager.validate(new ISOMsg("testISOBaseValidatingPackagerMti"));
assertNotNull("result", result);
}
use of org.jpos.iso.ISOVMsg in project jPOS by jpos.
the class MSGTEST021Test method testValidateThrowsNullPointerException2.
@Test
public void testValidateThrowsNullPointerException2() throws Throwable {
ISOComponent m = new ISOVMsg(new ISOMsg(100));
try {
new MSGTEST02().validate(m);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.iso.ISOVMsg in project jPOS by jpos.
the class MSGTEST021Test method testValidate.
@Test
public void testValidate() throws Throwable {
ISOVMsg result = (ISOVMsg) new MSGTEST02().validate(new ISOMsg("testMSGTEST02Mti"));
assertNotNull("result", result);
}
use of org.jpos.iso.ISOVMsg in project jPOS by jpos.
the class VErrorParserTest method testGetVErrors5.
@SuppressWarnings("unchecked")
@Test
public void testGetVErrors5() throws Throwable {
VErrorParser vErrorParser = new VErrorParser();
Vector result = vErrorParser.getVErrors(new ISOVMsg(new ISOMsg()));
assertEquals("result.size()", 0, result.size());
}
use of org.jpos.iso.ISOVMsg in project jPOS by jpos.
the class VErrorParserTest method testGetVErrors2.
@SuppressWarnings("unchecked")
@Test
public void testGetVErrors2() throws Throwable {
VErrorParser vErrorParser = new VErrorParser();
ISOVError FirstError = new ISOVError("testVErrorParserDescription", "testVErrorParserRejectCode");
ISOComponent c = new ISOVMsg(new ISOMsg("testVErrorParserMti"), FirstError);
Vector result = vErrorParser.getVErrors(c);
assertEquals("result.size()", 1, result.size());
assertSame("result.get(0)", FirstError, result.get(0));
}
Aggregations