use of io.atlasmap.java.test.SourceOrderList in project atlasmap by atlasmap.
the class JavaConstructServiceComplexListTest method testConstructSourceOrderList.
@Test
public void testConstructSourceOrderList() throws Exception {
Object targetObject = constructService.constructClass(generateOrderList("Source"), null);
assertNotNull(targetObject);
assertTrue(targetObject instanceof SourceOrderList);
SourceOrderList orderList = (SourceOrderList) targetObject;
assertNotNull(orderList.getOrders());
assertTrue(orderList.getOrders().isEmpty());
assertNull(orderList.getNumberOrders());
assertNull(orderList.getOrderBatchNumber());
}
use of io.atlasmap.java.test.SourceOrderList in project atlasmap by atlasmap.
the class ClassHelperTest method testParentObjectForPathList.
@Test
public void testParentObjectForPathList() throws Exception {
SourceOrderList sourceOrderList = new SourceOrderList();
List<BaseOrder> sourceOrders = new ArrayList<>();
sourceOrderList.setOrders(sourceOrders);
SourceAddress sourceAddress = new SourceAddress();
SourceOrder sourceOrder = new SourceOrder();
sourceOrder.setAddress(sourceAddress);
sourceOrderList.getOrders().add(sourceOrder);
Object parentObject = ClassHelper.parentObjectForPath(sourceOrderList, new AtlasPath("orders<>"), true);
assertNotNull(parentObject);
assertTrue(parentObject instanceof List<?>);
assertEquals(sourceOrders, parentObject);
}
Aggregations