use of io.atlasmap.java.test.SourceAddress in project atlasmap by atlasmap.
the class JavaConstructServiceSimpleTest method testConstructSourceAddress.
@Test
public void testConstructSourceAddress() throws Exception {
Object targetObject = constructService.constructClass(generateJavaClass("io.atlasmap.java.test.SourceAddress"), null);
assertNotNull(targetObject);
assertTrue(targetObject instanceof io.atlasmap.java.test.SourceAddress);
SourceAddress source = (SourceAddress) targetObject;
assertNull(source.getAddressLine1());
assertNull(source.getAddressLine2());
assertNull(source.getCity());
assertNull(source.getState());
assertNull(source.getZipCode());
}
use of io.atlasmap.java.test.SourceAddress 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