use of io.atlasmap.java.test.TargetOrderList in project atlasmap by atlasmap.
the class JavaConstructServiceComplexListTest method testConstructTargetOrderList.
@Test
public void testConstructTargetOrderList() throws Exception {
Object targetObject = constructService.constructClass(generateOrderList("Target"), null);
assertNotNull(targetObject);
assertTrue(targetObject instanceof TargetOrderList);
TargetOrderList orderList = (TargetOrderList) targetObject;
assertNotNull(orderList.getOrders());
assertTrue(orderList.getOrders().isEmpty());
assertNull(orderList.getNumberOrders());
assertNull(orderList.getOrderBatchNumber());
}
use of io.atlasmap.java.test.TargetOrderList in project atlasmap by atlasmap.
the class JavaConstructServiceComplexListTest method testConstructTargetOrderListFiltered.
@Test
public void testConstructTargetOrderListFiltered() throws Exception {
Object targetObject = constructService.constructClass(generateOrderList("Target"), new ArrayList<String>());
assertNotNull(targetObject);
assertTrue(targetObject instanceof TargetOrderList);
TargetOrderList orderList = (TargetOrderList) targetObject;
assertNotNull(orderList.getOrders());
assertTrue(orderList.getOrders().isEmpty());
assertNull(orderList.getNumberOrders());
}
use of io.atlasmap.java.test.TargetOrderList in project atlasmap by atlasmap.
the class JavaJavaComplexListTest method testProcessJavaJavaComplexAutoDetectFullTest.
@Test
@Ignore("https://github.com/atlasmap/atlasmap-runtime/issues/229 - Allow default implementation for abstract target field")
public void testProcessJavaJavaComplexAutoDetectFullTest() throws Exception {
AtlasContext context = atlasContextFactory.createContext(new File("src/test/resources/javaToJava/atlasmapping-complex-list-autodetect-full.xml"));
AtlasSession session = context.createSession();
BaseOrderList sourceOrderList = AtlasTestUtil.generateOrderListClass(SourceOrderList.class, SourceOrder.class, SourceAddress.class, SourceContact.class);
session.setDefaultSourceDocument(sourceOrderList);
context.process(session);
Object object = session.getDefaultTargetDocument();
assertNotNull(object);
assertTrue(object instanceof TargetOrderList);
AtlasTestUtil.validateOrderList((TargetOrderList) object);
}
use of io.atlasmap.java.test.TargetOrderList in project atlasmap by atlasmap.
the class JavaJavaComplexListTest method testProcessJavaJavaComplexAutoDetectBaseTest.
@Test
@Ignore("https://github.com/atlasmap/atlasmap-runtime/issues/229 - Allow default implementation for abstract target field")
public void testProcessJavaJavaComplexAutoDetectBaseTest() throws Exception {
AtlasContext context = atlasContextFactory.createContext(new File("src/test/resources/javaToJava/atlasmapping-complex-list-autodetect-base.xml"));
AtlasSession session = context.createSession();
BaseOrderList sourceOrderList = AtlasTestUtil.generateOrderListClass(SourceOrderList.class, SourceOrder.class, SourceAddress.class, SourceContact.class);
session.setDefaultSourceDocument(sourceOrderList);
context.process(session);
Object object = session.getDefaultTargetDocument();
assertNotNull(object);
assertTrue(object instanceof TargetOrderList);
AtlasTestUtil.validateOrderList((TargetOrderList) object);
}
Aggregations