Exemplo n.º 1
0
 @Test
 public void cancelDevliveryChangedOrderTest2() {
   order.setDeliveryMethod(DeliveryMethod.COURIER);
   if (order.getStatus().equals(OrderStatus.PAYMENT_PENDING)
       || order.getPayMethod().equals(PaymentMethod.UNKNOWN)
       || order.getDeliveryMethod().equals(DeliveryMethod.UNKNOWN)) {
     order.setStatus(OrderStatus.CANCELED);
   }
   assertEquals(order.getStatus(), OrderStatus.CANCELED);
 }
Exemplo n.º 2
0
  @Test
  public void cancelAlreadyCreatedOrderTest() {

    if (order.getStatus().equals(OrderStatus.PAYMENT_PENDING)
        || order.getPayMethod().equals(PaymentMethod.UNKNOWN)
        || order.getDeliveryMethod().equals(DeliveryMethod.UNKNOWN)) {

      order.setStatus(OrderStatus.CANCELED);
    }
    assertEquals(order.getStatus(), OrderStatus.CANCELED);
  }