Class DeclineIntegrationTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class DeclineIntegrationTest extends BaseAcceleratorSourcingIntegrationTest
This integration test creates a process and tests the order decline after the consignment is created. Please make sure that you have initialized and update junit tenant before running this test.
  • Constructor Details

    • DeclineIntegrationTest

      public DeclineIntegrationTest()
  • Method Details

    • setUp

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

      public void cleanUp()
    • shouldAutoReallocate_SingleEntry_SuccessReSourced__ToBusy_BanLocation

      public void shouldAutoReallocate_SingleEntry_SuccessReSourced__ToBusy_BanLocation() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Decline should SUCCESS with new location when to busy and ban first location
      Throws:
      InterruptedException
    • shouldManualReallocate_SingleEntry

      public void shouldManualReallocate_SingleEntry() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Decline should SUCCESS with new location when to busy and ban first location
      Throws:
      InterruptedException
    • shouldManualReallocateAndReassignNewTaskAssignmentWorkFlowAfterPacking

      public void shouldManualReallocateAndReassignNewTaskAssignmentWorkFlowAfterPacking() throws InterruptedException
      Given an shipping order with 1 entry:
      entry 1 : {quantity: 3, product: camera}
      Perform a pack and then perform complete manual-Reallocation on this consignment
      Result:
      1) A new Consignment is created, while the old consignment is cancelled
      2) Task Assignment workflow for the older consingment is terminated and a new workflow is assigned to the new consignment
      Throws:
      InterruptedException
    • shouldManualReallocatePartiallyAndReassignNewTaskAssignmentWorkFlowAfterPacking

      public void shouldManualReallocatePartiallyAndReassignNewTaskAssignmentWorkFlowAfterPacking() throws InterruptedException
      Given an shipping order with 1 entry:
      entry 1 : {quantity: 3, product: camera}
      Perform a pack and then perform partial manual-Reallocation on this consignment
      Result:
      1) A new Consignment is created, while the old consignment status is moved back to ConsignmentStatus.READY from ConsignmentStatus.READY_FOR_SHIPPING
      2) Task Assignment workflow for the older consingment is terminated and a new workflow is assigned to it.
      2) Also a new Task Assignment workflow is assigned to the new consignment.
      Throws:
      InterruptedException
    • shouldAutoReallocateAndReassignNewTaskAssignmentWorkFlowAfterPacking

      public void shouldAutoReallocateAndReassignNewTaskAssignmentWorkFlowAfterPacking() throws InterruptedException
      Given an shipping order with 1 entry:
      entry 1 : {quantity: 3, product: camera}
      Perform a pack and perform complete auto-Reallocation on this consignment
      Result:
      1) A new Consignment is created, while the old consignment is cancelled
      2) Task Assignment workflow for the older consingment is terminated and a new workflow is assigned to the new consignment
      Throws:
      InterruptedException
    • shouldAutoReallocatePartiallyAndReassignNewTaskAssignmentWorkFlowAfterPacking

      public void shouldAutoReallocatePartiallyAndReassignNewTaskAssignmentWorkFlowAfterPacking() throws InterruptedException
      Given an shipping order with 1 entry:
      entry 1 : {quantity: 3, product: camera}
      Perform a pack and then perform partial auto-Reallocation on this consignment
      Result:
      1) A new Consignment is created, while the old consignment status is moved back to ConsignmentStatus.READY from ConsignmentStatus.READY_FOR_SHIPPING
      2) Task Assignment workflow for the older consingment is terminated and a new workflow is assigned to it.
      2) Also a new Task Assignment workflow is assigned to the new consignment.
      Throws:
      InterruptedException
    • shouldAutoReallocate_SingleEntry_PartiallyFailReSourced

      public void shouldAutoReallocate_SingleEntry_PartiallyFailReSourced() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Decline should fail, and confirm the consignment
      Throws:
      InterruptedException
    • shouldAutoReallocate_SingleEntry_FailReSourced__OutOfStock_ResetInventory

      public void shouldAutoReallocate_SingleEntry_FailReSourced__OutOfStock_ResetInventory() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Decline should SUCCESS with new location when to out of stock and reset inventory
      Throws:
      InterruptedException
    • shouldAutoReallocate_SingleEntry_PartiallyReSourcingSuccess

      public void shouldAutoReallocate_SingleEntry_PartiallyReSourcingSuccess() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Decline should SUCCESS with new location when partially reallocated
      Throws:
      InterruptedException
    • shouldAutoReallocate_MixManualAuto_ReSourcingFailed

      public void shouldAutoReallocate_MixManualAuto_ReSourcingFailed() throws InterruptedException
      Given an shipping order with 3 entries:
      DeclineEntry 1 : auto
      DeclineEntry 2 : manual
      Result:
      Decline should SUCCESS
      Throws:
      InterruptedException
    • shouldAutoDecline_SuccessReSourcedTwice

      public void shouldAutoDecline_SuccessReSourcedTwice() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      Decline should SUCCESS without sufficient stock twice
      Throws:
      InterruptedException
    • shouldAutoDecline_PartiallyDeclineTwice

      public void shouldAutoDecline_PartiallyDeclineTwice() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      Result:
      partially decline same consignment twice
      Throws:
      InterruptedException
    • shouldAutoDecline2Entries_PartiallySuccessReSourced

      public void shouldAutoDecline2Entries_PartiallySuccessReSourced() throws InterruptedException
      Given an shipping order with 2 entries:
      entry 1 : {quantity: 3, product: camera}
      entry 2 : {quantity: 2, product: memoryCard}
      Result:
      Decline should SUCCESS
      Throws:
      InterruptedException
    • shouldAutoDecline1Entry_MultiEntries_SuccessReSourced

      public void shouldAutoDecline1Entry_MultiEntries_SuccessReSourced() throws InterruptedException
      Given an shipping order with 2 entries:
      entry 1 : {quantity: 3, product: camera}
      entry 2 : {quantity: 2, product: memoryCard}
      Result:
      Decline should SUCCESS, and confirm order
      Throws:
      InterruptedException
    • shouldAutoDecline1Entry_MultiEntries_FailReSourced

      public void shouldAutoDecline1Entry_MultiEntries_FailReSourced() throws InterruptedException
      Given an shipping order with 2 entries:
      entry 1 : {quantity: 3, product: camera}
      entry 2 : {quantity: 2, product: memoryCard}
      Result:
      Decline should Fail
      Throws:
      InterruptedException
    • shouldAutoReallocate_SingleEntry_FailReSourced__Damaged_ResetInventory

      public void shouldAutoReallocate_SingleEntry_FailReSourced__Damaged_ResetInventory() throws InterruptedException
      Throws:
      InterruptedException
    • shouldManualReallocate_DamagedEntry_BanExternalWarehouse

      public void shouldManualReallocate_DamagedEntry_BanExternalWarehouse() throws InterruptedException
      Given an shipping order from USA with entry {quantity: 3, product: camera}
      StockLevels : Montreal Warehouse(External) : {quantity: 6, product: camera}
      Boston Warehouse(Internal) : {quantity: 3, product: camera}
      The order gets sourced from Montreal Warehouse and now the consignment is declined with reason DAMAGED Result:
      The order gets resourced from Boston and the Montreal warehouse is banned for 1 day
      Throws:
      InterruptedException
    • shouldExcludeBanWarehouseDuringATPCalculation

      public void shouldExcludeBanWarehouseDuringATPCalculation() throws InterruptedException
      Given a shipping order from USA with entry {quantity: 3, product: camera}
      StockLevels : Montreal Warehouse: {quantity: 6, product: camera}
      The order gets sourced from Montreal Warehouse and now the consignment is declined with reason TOOBUSY Result:
      The Montreal warehouse is banned and the ATP value become to 0
      Throws:
      InterruptedException
    • shouldSuccessfullyAutoReallocateTwice

      public void shouldSuccessfullyAutoReallocateTwice() throws InterruptedException
      Given an shipping order with 1 entries:
      entry 1 : {quantity: 3, product: camera}
      The consignment is auto reallocated automatically with partial quantity 2 Then consignment is auto reallocated again with left over quantity 1 Result:
      Decline should SUCCESS for both auto reallocation actions
      Throws:
      InterruptedException