Package org.apache.isis.viewer.junit.sample.domain

Examples of org.apache.isis.viewer.junit.sample.domain.Order


    }

    @Test
    public void canInvokeAction() {
        final int sizeBefore = custJsWO.getOrders().size();
        final Order orderBefore = custJsWO.getLastOrder();
        custJsWO.placeOrder(product355DO, 3);
        final Order orderAfter = custJsWO.getLastOrder();

        final int sizeAfter = custJsWO.getOrders().size();
        assertThat(sizeAfter, is(sizeBefore + 1));
        assertThat(orderAfter, is(not(orderBefore)));
    }
View Full Code Here


    }

    @Test
    public void whenCollectionDisabledThenAddToThrowsException() {
        final List<Order> orders = custJsWO.getOrders();
        final Order order = orders.get(0);
        try {
            custJsWO.addToMoreOrders(order);
            fail("Should have thrown exception");
        } catch (final DisabledException ex) {
            assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetAnnotation.class));
View Full Code Here

    }

    @Test
    public void whenCollectionDisabledThenAddToThrowsException() {
        final List<Order> orders = custJsWO.getOrders();
        final Order order = orders.get(0);
        try {
            custJsWO.addToMoreOrders(order);
            fail("Should have thrown exception");
        } catch (final DisabledException ex) {
            assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetAnnotation.class));
View Full Code Here

    }

    @Test
    public void canInvokeAction() {
        final int sizeBefore = custJsWO.getOrders().size();
        final Order orderBefore = custJsWO.getLastOrder();
        custJsWO.placeOrder(product355DO, 3);
        final Order orderAfter = custJsWO.getLastOrder();

        final int sizeAfter = custJsWO.getOrders().size();
        assertThat(sizeAfter, is(sizeBefore + 1));
        assertThat(orderAfter, is(not(orderBefore)));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.junit.sample.domain.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.