Package org.switchyard.transform.ootb.map.ordermodel

Examples of org.switchyard.transform.ootb.map.ordermodel.Order


        Map orderHash = buildOrderMap();
        FromMapToJava transformer = new FromMapToJava();

        transformer.setTo(JavaTypes.toMessageType(Order.class));

        Order order = (Order) transformer.transform(orderHash);

        Assert.assertEquals(1234, order.getHeader().getOrderId());
        Assert.assertEquals("catalog", order.getHeader().getOriginType());
        Assert.assertEquals(1234, order.getHeader().getCustomerDetails().getCustId());
        Assert.assertEquals("Seamus Ungabunga", order.getHeader().getCustomerDetails().getName());
        List<Item> items = order.getItems();
        Assert.assertEquals(2, items.size());
        Assert.assertEquals((Integer) 1234, items.get(0).getItemId());
        Assert.assertEquals("X", items.get(0).getProductId());
        Assert.assertEquals((Integer) 1235, items.get(1).getItemId());
        Assert.assertEquals("Y", items.get(1).getProductId());
View Full Code Here

TOP

Related Classes of org.switchyard.transform.ootb.map.ordermodel.Order

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.