@Test @Ignore public void anOrderCanBeShipped() throws Exception { Order order = new Order("x", "y", "z"); assertEquals(false, order.isShipped()); order.ship(); assertEquals("order should be shipped", true, order.isShipped()); }
@Test @Ignore public void theControllerWillShipAnOrder() throws Exception { Order order = new Order("5555", "_", "_"); orders.add(order); when(request.getMethod()).thenReturn("POST"); when(request.getRequestURI()).thenReturn("/orders/shipped"); when(request.getParameter("order_code")).thenReturn("5555"); ordersController.service(); assertEquals("controller should set shipped", true, order.isShipped()); verify(ordersView).refresh(); }