private void assertValue2Constants(IvlRealDataType data) { assertNotNull(data.getValue2().getLow()); assertEquals(NullFlavor.NI, data.getValue2().getLow().getNullFlavor()); assertNotNull(data.getValue2().getAny()); assertEquals(NullFlavor.NI, data.getValue2().getAny().getNullFlavor()); assertNull(data.getValue2().getNullFlavor()); assertNull(data.getValue2().getHighClosed()); assertNotNull(data.getValue2().getWidth()); assertEquals(NullFlavor.NI, data.getValue2().getWidth().getNullFlavor()); }
private void assertValue2(Collection<IvlRealDataType> result, List<Integer> index) { assertNotNull(result); int counter = 1; for (IvlRealDataType data : result) { // Validate 2nd record if ((index == null && counter == 7) || (index != null && index.contains("7"))) { if (index != null) index.remove("7"); assertNotNull(data); assertNotNull(data.getValue2()); assertEquals(new Double(-310), data.getValue2().getHigh().getValue()); assertNull(data.getValue2().getLowClosed()); assertValue2Constants(data); counter++; continue; } // Validate 3rd record else if ((index == null && counter == 8) || (index != null && index.contains("8"))) { if (index != null) index.remove("8"); assertNotNull(data); assertNotNull(data.getValue2()); assertEquals(new Double(40), data.getValue2().getHigh().getValue()); assertEquals(Boolean.TRUE, data.getValue2().getLowClosed()); assertValue2Constants(data); counter++; continue; } // Validate 4th record else if ((index == null && counter == 9) || (index != null && index.contains("9"))) { if (index != null) index.remove("9"); assertNotNull(data); assertNotNull(data.getValue2()); assertNull(data.getValue2().getHigh().getValue()); assertEquals(NullFlavor.NI, data.getValue2().getHigh().getNullFlavor()); assertEquals(Boolean.TRUE, data.getValue2().getLowClosed()); assertValue2Constants(data); counter++; continue; } // Validate 5th record else if ((index == null && counter == 10) || (index != null && index.contains("10"))) { if (index != null) index.remove("10"); assertNotNull(data); assertNotNull(data.getValue2()); assertEquals(new Double(4222222), data.getValue2().getHigh().getValue()); assertEquals(Boolean.TRUE, data.getValue2().getLowClosed()); assertValue2Constants(data); counter++; continue; } // Validate 6th record else if ((index == null && counter == 11) || (index != null && index.contains("11"))) { if (index != null) index.remove("11"); assertNotNull(data); assertNotNull(data.getValue2()); assertEquals(new Double(43), data.getValue2().getHigh().getValue()); assertEquals(Boolean.FALSE, data.getValue2().getLowClosed()); assertValue2Constants(data); counter++; continue; } // Validate 6th record else if ((index == null && counter == 12) || (index != null && index.contains("12"))) { if (index != null) index.remove("12"); assertNotNull(data); assertNotNull(data.getValue2()); assertEquals(new Double(44), data.getValue2().getHigh().getValue()); assertEquals(Boolean.FALSE, data.getValue2().getLowClosed()); assertValue2Constants(data); counter++; continue; } // Validate all remaining records else { assertNotNull(data); assertNotNull(data.getValue2()); // Global constant assertEquals(NullFlavor.NI, data.getValue2().getNullFlavor()); assertNull(data.getValue2().getHigh()); assertNull(data.getValue2().getLowClosed()); counter++; } } }