use of org.jpos.iso.IFB_LLNUM in project jPOS by jpos.
the class ISOMultiFieldPackagerTest method testPackList.
public void testPackList() throws Exception {
Vector list = new Vector();
list.add(new IFB_LLNUM(10, "Should not be this", true));
list.add(new IFE_LLNUM(10, "Should be 041234"));
list.add(new IFB_LLNUM(10, "The one to pack", true));
ISOMultiFieldPackager packager = new ISOMultiFieldPackager("Should be 041234", list);
packager.hint("The one to pack");
ISOField field = new ISOField(12, "1234");
TestUtils.assertEquals(new byte[] { (byte) 0x04, (byte) 0x12, (byte) 0x34 }, packager.pack(field));
}
Aggregations