/** * Check that data object contains the expected values. * * @param dfhcommarea the java object to check */ public static void checkJavaObjectSome(final Dfhcommarea dfhcommarea) { assertEquals(10, dfhcommarea.getCItemsNumber()); for (int i = 0; i < 10; i++) { com.legstar.test.coxb.vararcom.CArray item = dfhcommarea.getCArray().get(i); assertEquals("ABJAD", item.getCItem1()); assertEquals(Short.parseShort(Integer.toString(7 * i)), item.getCItem2()); } }
/** * Check that content is actually returned by vararcom. * * @param dfhcommarea the java object to check */ public static void checkJavaObjectVararcom(final Dfhcommarea dfhcommarea) { assertEquals(36, dfhcommarea.getCItemsNumber()); for (int i = 0; i < 36; i++) { com.legstar.test.coxb.vararcom.CArray item = dfhcommarea.getCArray().get(i); assertEquals("FGHIJ", item.getCItem1()); assertEquals(Short.parseShort(Integer.toString(5 * (i + 1))), item.getCItem2()); } }
/** @return an instance of a valued java object. */ public static Dfhcommarea getJavaObjectFull() { ObjectFactory of = new ObjectFactory(); Dfhcommarea dfhcommarea = of.createDfhcommarea(); dfhcommarea.setCItemsNumber(Short.parseShort("250")); for (int i = 0; i < 250; i++) { CArray item = new CArray(); item.setCItem1("ABJAD"); item.setCItem2(Short.parseShort(Integer.toString(7 * i))); dfhcommarea.getCArray().add(item); } return dfhcommarea; }
/** * Check that data object contains the expected values. * * @param dfhcommarea the java object to check */ public static void checkJavaObjectEmpty(final Dfhcommarea dfhcommarea) { assertEquals(0, dfhcommarea.getCItemsNumber()); }
/** @return an instance of a valued java object. */ public static Dfhcommarea getJavaObjectEmpty() { ObjectFactory of = new ObjectFactory(); Dfhcommarea dfhcommarea = of.createDfhcommarea(); dfhcommarea.setCItemsNumber(Short.parseShort("0")); return dfhcommarea; }