Class OrderSourcingIntegrationTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class OrderSourcingIntegrationTest extends BaseAcceleratorSourcingIntegrationTest
  • Constructor Details

    • OrderSourcingIntegrationTest

      public OrderSourcingIntegrationTest()
  • Method Details

    • setUp

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

      public void cleanUp()
    • updateTaskAssignmentWorkflowWithPackShippingConsignment

      public void updateTaskAssignmentWorkflowWithPackShippingConsignment() throws InterruptedException
      Given that a consignment is Packed the Task Assignment Workflow must also be updated. Result: The task assignment workflow is in the Shipping step
      Throws:
      InterruptedException
    • updateTaskAssignmentWorkflowWithPackPickUpConsignment

      public void updateTaskAssignmentWorkflowWithPackPickUpConsignment() throws InterruptedException
      Given that a consignment is Packed the Task Assignment Workflow must also be updated. Result: The task assignment workflow is in the Ready for Pick up step
      Throws:
      InterruptedException
    • updateTaskAssignmentWorkflowWithShipConsignment

      public void updateTaskAssignmentWorkflowWithShipConsignment() throws InterruptedException
      Given that a consignment is Shipped the Task Assignment Workflow must also be updated. Result: The task assignment workflow is terminated
      Throws:
      InterruptedException
    • updateTaskAssignmentWorkflowWithPickupConsignment

      public void updateTaskAssignmentWorkflowWithPickupConsignment() throws InterruptedException
      Given that a pickup consignment is Shipped the Task Assignment Workflow must also be updated. Result: The task assignment workflow is terminated
      Throws:
      InterruptedException
    • shouldSourcingSuccess_SingleEntry

      public void shouldSourcingSuccess_SingleEntry() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Verify the order status and consignment result
      Throws:
      InterruptedException
    • shouldNotSourceSourcingConfigNull

      public void shouldNotSourceSourcingConfigNull() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      The BaseStoreModel for the Order does not have SourcingConfigModel.
      So the sourcing fails and order status changes to Suspended.

      Later a SourcingConfigModel is provided for the BaseStoreModel, and as a result:
      1). Sourcing is successful and consignment is created
      2). The order status changes to Ready
      3). The ATP is reduced by the ordered Qty
      Throws:
      InterruptedException
    • shouldSourcingSuccess_SingleEntry_PickUp

      public void shouldSourcingSuccess_SingleEntry_PickUp() throws InterruptedException
      Given an pickup order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Verify the order status and consignment result
      Throws:
      InterruptedException
    • shouldSourcingFail_SingleEntry

      public void shouldSourcingFail_SingleEntry() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Verify the order sourcing failed
      Throws:
      InterruptedException
    • shouldSourcingSuccess_Priority

      public void shouldSourcingSuccess_Priority() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Verify the order status and consignment result
      Throws:
      InterruptedException
    • shouldPickLocationWithLowerScore

      public void shouldPickLocationWithLowerScore() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Second location should be picked, even if the first one has higher score.
      That's because of fitness strategy - second warehouse is able to make whole order at one time.
      Throws:
      InterruptedException
    • shouldTakeAllFromFirstLocationAndTheRestFromSecond

      public void shouldTakeAllFromFirstLocationAndTheRestFromSecond() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      In this case, both locations cannot send order at one time. All products will be taken from first location - because of the higher score.
      To make whole order - the one product which is left will be taken from second location.
      Throws:
      InterruptedException
    • shouldTakeAllFromLocationWithHigherScore

      public void shouldTakeAllFromLocationWithHigherScore() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Whole order will be delivered from first location because score is higher.
      Throws:
      InterruptedException
    • shouldSourcingSuccess_DistanceMontreal

      public void shouldSourcingSuccess_DistanceMontreal() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Verify the location where it is assigned
      Throws:
      InterruptedException
    • shouldSourcingSuccess_DistanceBoston

      public void shouldSourcingSuccess_DistanceBoston() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Verify the location where it is assigned
      Throws:
      InterruptedException
    • shouldSourcingSuccess_MultiEntry_SingleConsignment

      public void shouldSourcingSuccess_MultiEntry_SingleConsignment() throws InterruptedException
      Given an shipping order with 2 entries:
      entry 1 : {quantity: 3, product: camera}
      entry 2 : {quantity: 2, product: memoryCard}
      Result:
      Verify the order status and consignment result
      Throws:
      InterruptedException
    • shouldSourcingSuccess_MultiEntries_MultiConsignments

      public void shouldSourcingSuccess_MultiEntries_MultiConsignments() throws InterruptedException
      Given an shipping order with 2 entries:
      entry 1 : {quantity: 3, product: camera}
      entry 2 : {quantity: 2, product: memoryCard}
      Result:
      Verify the order status and consignment result
      Throws:
      InterruptedException
    • shouldSourcingSuccess_MultiEntries_MultiConsignments_SplitOrderEntries

      public void shouldSourcingSuccess_MultiEntries_MultiConsignments_SplitOrderEntries() throws InterruptedException
      Given an shipping order with 2 entries:
      entry 1 : {quantity: 3, product: camera}
      entry 2 : {quantity: 2, product: memoryCard}
      Result:
      Verify the order status and consignment result
      Throws:
      InterruptedException
    • shouldSourcingSuccess_OMSE_640

      public void shouldSourcingSuccess_OMSE_640() throws InterruptedException
      Given an order with 3 entries:
      entry 1 : {quantity: 1, product: product1}
      entry 2 : {quantity: 1, product: product2}
      entry 3 : {quantity: 7, product: product3}
      POS Montreal ->Montreal product1 quantity=6, product2 quantity =6, product3 quantity = 6 POS Boston ->Boston product1 quantity=6, product2 quantity =6, product3 quantity = 0 POS Toronto ->Toronto product1 quantity=0, product2 quantity =0, product3 quantity = 6 Result:
      It should source complete from 2 location, 6 of product3 from Montreal, and 1 from the Toronto
      Throws:
      InterruptedException
    • shouldNotConfirmTwice

      public void shouldNotConfirmTwice() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Verify cannot confirm order twice
      Throws:
      InterruptedException
    • shouldSourcingSuccess_ExternalWarehouse

      public void shouldSourcingSuccess_ExternalWarehouse() throws InterruptedException
      Throws:
      InterruptedException
    • shouldFailSourcing_ExternalWarehouse

      public void shouldFailSourcing_ExternalWarehouse() throws InterruptedException
      Throws:
      InterruptedException