use of org.jpos.iso.ISOField in project jPOS by jpos.
the class VErrorParserTest method testGetVErrorsThrowsNullPointerException2.
@Test
public void testGetVErrorsThrowsNullPointerException2() throws Throwable {
VErrorParser vErrorParser = new VErrorParser();
ISOVField c = new ISOVField(new ISOField(), new ISOVError("testVErrorParserDescription"));
c.addISOVError(null);
try {
vErrorParser.getVErrors(c);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.iso.ISOField in project jPOS by jpos.
the class CTCSubFieldPackagerTest method testPack1.
@Test
public void testPack1() throws Throwable {
CTCSubFieldPackager cTCSubFieldPackager = new CTCSubFieldPackager();
ISOFieldPackager[] fld = new ISOFieldPackager[1];
cTCSubFieldPackager.setFieldPackager(fld);
byte[] result = cTCSubFieldPackager.pack(new ISOField());
assertEquals("result.length", 0, result.length);
}
use of org.jpos.iso.ISOField in project jPOS by jpos.
the class CTCSubFieldPackagerTest method testUnpack.
@Test
public void testUnpack() throws Throwable {
byte[] b = new byte[0];
int result = new CTCSubFieldPackager().unpack(new ISOField(), b);
assertEquals("result", 0, result);
}
use of org.jpos.iso.ISOField in project jPOS by jpos.
the class EuroSubFieldPackagerTest method testPack3.
@Test
public void testPack3() throws Throwable {
EuroSubFieldPackager euroSubFieldPackager = new EuroSubFieldPackager();
ISOFieldPackager[] fld = new ISOFieldPackager[1];
euroSubFieldPackager.setFieldPackager(fld);
byte[] result = euroSubFieldPackager.pack(new ISOField());
assertEquals("result.length", 0, result.length);
}
use of org.jpos.iso.ISOField in project jPOS by jpos.
the class ISOMsgFieldValidatingPackagerTest method testValidateWithNonISOMsgThrowsNullPointerException.
@Test
public void testValidateWithNonISOMsgThrowsNullPointerException() throws Throwable {
try {
new ISOMsgFieldValidatingPackager(new IFA_BINARY(100, "testISOMsgFieldValidatingPackagerDescription"), new ISOBaseValidatingPackager()).validate(new ISOField(100));
fail("Expected ClassCastException to be thrown");
} catch (NullPointerException ex) {
assertEquals("ex.getClass()", NullPointerException.class, ex.getClass());
}
}
Aggregations