Package org.switchyard.quickstarts.bpm.service.data

Examples of org.switchyard.quickstarts.bpm.service.data.Order


    @ServiceOperation("Inventory.checkAvailability")
    private Invoker service;

    @Test
    public void weGotIt() {
        Order order = new Order();
        order.setItemId("cowbell");
        order.setQuantity(50);

        Assert.assertTrue(
            service.sendInOut(order)
                .getContent(Boolean.class));
    }
View Full Code Here


                .getContent(Boolean.class));
    }

    @Test
    public void weDontGotIt() {
        Order order = new Order();
        order.setItemId("cowbell");
        order.setQuantity(500);

        Assert.assertFalse(
            service.sendInOut(order)
                .getContent(Boolean.class));
    }
View Full Code Here

        System.setProperty("org.switchyard.component.http.standalone.port", "18001");
    }

    @Test
    public void orderShipped() {
        Order order = new Order();
        order.setItemId("cowbell");
        order.setOrderId("SHIPIT");
        order.setQuantity(50);

        OrderAck ack = service.sendInOut(order).getContent(OrderAck.class);

        Assert.assertTrue(ack.isAccepted());
        System.out.println(ack.getStatus());
View Full Code Here

        System.out.println(ack.getStatus());
    }

    @Test
    public void orderOnHold() {
        Order order = new Order();
        order.setItemId("cowbell");
        order.setOrderId("FEVER");
        order.setQuantity(500);

        OrderAck ack = service.sendInOut(order).getContent(OrderAck.class);

        Assert.assertFalse(ack.isAccepted());
        System.out.println(ack.getStatus());
View Full Code Here

    @ServiceOperation("BackOrder.hold")
    private Invoker service;

    @Test
    public void sendMessage() {
        Order order = new Order();
        order.setOrderId("SHIPIT");
        OrderAck ack = service.sendInOut(order).getContent(OrderAck.class);

        Assert.assertFalse(ack.isAccepted());
        Assert.assertEquals(BackOrderBean.HOLD_STATUS, ack.getStatus());
    }
View Full Code Here

    @ServiceOperation("Shipping.ship")
    private Invoker service;

    @Test
    public void testShip() {
        Order order = new Order();
        order.setOrderId("SHIPIT");
        OrderAck ack = service.sendInOut(order).getContent(OrderAck.class);

        Assert.assertTrue(ack.isAccepted());
        Assert.assertEquals(ShippingBean.SHIPPED_STATUS, ack.getStatus());
    }
View Full Code Here

TOP

Related Classes of org.switchyard.quickstarts.bpm.service.data.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.