Package org.jpos.iso

Examples of org.jpos.iso.ISOField


            new IFB_LLNUM(10, "Should not be this", true),
            new IFE_LLNUM(10, "Should be 041234"),
            new IFB_LLNUM(10, "The one to pack", true) });
    // packager.hint("The one to pack");

    ISOField field = new ISOField(12, "1234");

    try {
      TestUtils.assertEquals(new byte[] { (byte) 0x04, (byte) 0x12,
          (byte) 0x34 }, packager.pack(field));
      fail("pack without hint should fail with ISOException!");
View Full Code Here


    list.add(new IFB_LLNUM(10, "Should not be this", true));

    ISOMultiFieldPackager packager = new ISOMultiFieldPackager(
        "A List choice", list);

    ISOField field = new ISOField();
    packager.unpack(field, raw, 0);

    assertEquals("1234", (String) field.getValue());
  }
View Full Code Here

        "An Array choice", new ISOFieldPackager[] {
            new IFB_LLNUM(10, "Should not be this", true),
            new IFE_LLNUM(10, "Should be 041234"),
            new IFB_LLNUM(10, "Should not be this", true) });

    ISOField field = new ISOField();
    packager.unpack(field, raw, 0);

    assertEquals("1234", (String) field.getValue());

  }
View Full Code Here

        "An Array choice", new ISOFieldPackager[] {
            new IFB_LLNUM(10, "Should not be this", true),
            new IFE_LLNUM(10, "Should be 041234"),
            new IFB_LLNUM(10, "Should not be this", true) });

    ISOField field = new ISOField();
    packager.unpack(field, (InputStream)new ByteArrayInputStream(raw));

    assertEquals("1234", (String) field.getValue());

  }
View Full Code Here

TOP

Related Classes of org.jpos.iso.ISOField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.