Class OrderOnHoldIntegrationTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class OrderOnHoldIntegrationTest extends BaseAcceleratorSourcingIntegrationTest
  • Constructor Details

    • OrderOnHoldIntegrationTest

      public OrderOnHoldIntegrationTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • cleanUp

      public void cleanUp()
    • shouldPutOrderOnHold

      public void shouldPutOrderOnHold() throws InterruptedException, OrderCancelException
      Given an order with 1 entries and put this order on hold:
      entry 1 : {quantity: 3, product: product1}
      Consignment 1 : {quantity: 3, product: product1, Ready}

      Result:
      1. Consignment 1 should be cancelled

      Assert:
      It verifies the cancelled consignment

      Throws:
      InterruptedException
      OrderCancelException
    • shouldPutPartiallyDeclinedOrderOnHold

      public void shouldPutPartiallyDeclinedOrderOnHold() throws InterruptedException, OrderCancelException
      Given a partially declined order with 1 entries and put this order on hold:
      entry 1 : {quantity: 3, product: product1}
      Consignment 1 : {quantity: 2, quantityDeclined: 1, product: product1, Ready}
      Consignment 2 : {quantity: 1, product: product1, Ready}

      Result:
      1. Consignment 1 should be cancelled
      2. Consignment 2 should be cancelled

      Assert:
      It verifies the cancelled consignments

      Throws:
      InterruptedException
      OrderCancelException
    • shouldPutPartiallyCancelledOrderOnHoldAndCancelPartiallyAgain

      public void shouldPutPartiallyCancelledOrderOnHoldAndCancelPartiallyAgain() throws InterruptedException, OrderCancelException
      Given a partially cancelled order with 1 entries and put this order on hold:
      entry 1 : {quantity: 3, product: product1}
      Consignment 1 : {quantity: 3, product: product1, Cancelled}
      Consignment 2 : {quantity: 2, product: product1, Ready}

      Result:
      1. Consignment 1 should be cancelled
      2. Consignment 2 should be cancelled

      Assert:
      It verifies the cancelled consignments

      Throws:
      InterruptedException
      OrderCancelException
    • shouldReSourceOnHoldOrder

      public void shouldReSourceOnHoldOrder() throws InterruptedException, OrderCancelException
      Given an on hold order with 1 entries and re-source this order
      entry 1 : {quantity: 3, product: product1}
      Consignment 1 : {quantity: 3, product: product1, Cancelled}

      Result:
      1. Consignment 1 should be cancelled
      2. Consignment 2 should be Ready

      Assert:
      It verifies the consignments

      Throws:
      InterruptedException
      OrderCancelException
    • shouldCancelOnHoldOrder

      public void shouldCancelOnHoldOrder() throws InterruptedException, OrderCancelException
      Given an on hold order with 1 entries and cancel this order
      entry 1 : {quantity: 3, product: product1}
      Consignment 1 : {quantity: 3, product: product1, Cancelled}

      Result:
      1. Consignment 1 should be cancelled
      2. Order should be cancelled

      Assert:
      It verifies the cancelled order and consignment

      Throws:
      InterruptedException
      OrderCancelException