use of org.jpos.iso.IFA_AMOUNT in project jPOS by jpos.
the class CTCSubElementPackagerTest method testUnpackThrowsNullPointerException2.
@Test
public void testUnpackThrowsNullPointerException2() throws Throwable {
CTCSubElementPackager cTCSubElementPackager = new CTCSubElementPackager();
ISOFieldPackager[] fld = new ISOFieldPackager[2];
fld[0] = new IFA_AMOUNT();
cTCSubElementPackager.setFieldPackager(fld);
byte[] b = new byte[3];
ISOComponent m = new ISOMsg("testCTCSubElementPackagerMti");
try {
cTCSubElementPackager.unpack(m, b);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.iso.IFA_AMOUNT in project jPOS by jpos.
the class GenericPackagerTest method testGetBitMapfieldPackager.
@Test
public void testGetBitMapfieldPackager() throws Throwable {
ISOFieldPackager iFA_AMOUNT = new IFA_AMOUNT();
ISOFieldPackager[] fld = new ISOFieldPackager[2];
fld[1] = iFA_AMOUNT;
GenericPackager genericPackager = new GenericPackager();
genericPackager.setFieldPackager(fld);
ISOFieldPackager result = genericPackager.getBitMapfieldPackager();
assertSame("result", iFA_AMOUNT, result);
}
Aggregations