private void fixup (ISOMsg m, int[] bfields) throws ISOException { for (int f : bfields) { if (m.hasField(f)) { ISOComponent c = m.getComponent(f); if (c instanceof ISOField) m.set(f, ((ISOField) c).getBytes()); } } } private XMLReader createXMLReader () throws SAXException {
@Test public void testGetBytesThrowsNullPointerException() throws Throwable { byte[] bytes = new ISOField(100).getBytes(); assertArrayEquals(new byte[0], bytes); }
@Test public void testGetBytes1() throws Throwable { byte[] result = new ISOField(100, "testISOFieldv").getBytes(); assertEquals("result.length", 13, result.length); assertEquals("result[0]", (byte) 116, result[0]); }
@Test public void testGetBytes() throws Throwable { ISOField iSOField = new ISOField(100); iSOField.setValue(""); byte[] result = iSOField.getBytes(); assertEquals("result.length", 0, result.length); }