Class DeclineIntegrationTest

    • Constructor Detail

      • DeclineIntegrationTest

        public DeclineIntegrationTest()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • cleanUp

        public void cleanUp()
      • shouldAutoReallocate_SingleEntry_SuccessReSourced__ToBusy_BanLocation

        public void shouldAutoReallocate_SingleEntry_SuccessReSourced__ToBusy_BanLocation()
                                                                                   throws java.lang.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:
        java.lang.InterruptedException
      • shouldManualReallocate_SingleEntry

        public void shouldManualReallocate_SingleEntry()
                                                throws java.lang.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:
        java.lang.InterruptedException
      • shouldManualReallocateAndReassignNewTaskAssignmentWorkFlowAfterPacking

        public void shouldManualReallocateAndReassignNewTaskAssignmentWorkFlowAfterPacking()
                                                                                    throws java.lang.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:
        java.lang.InterruptedException
      • shouldManualReallocatePartiallyAndReassignNewTaskAssignmentWorkFlowAfterPacking

        public void shouldManualReallocatePartiallyAndReassignNewTaskAssignmentWorkFlowAfterPacking()
                                                                                             throws java.lang.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:
        java.lang.InterruptedException
      • shouldAutoReallocateAndReassignNewTaskAssignmentWorkFlowAfterPacking

        public void shouldAutoReallocateAndReassignNewTaskAssignmentWorkFlowAfterPacking()
                                                                                  throws java.lang.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:
        java.lang.InterruptedException
      • shouldAutoReallocatePartiallyAndReassignNewTaskAssignmentWorkFlowAfterPacking

        public void shouldAutoReallocatePartiallyAndReassignNewTaskAssignmentWorkFlowAfterPacking()
                                                                                           throws java.lang.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:
        java.lang.InterruptedException
      • shouldAutoReallocate_SingleEntry_PartiallyFailReSourced

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

        public void shouldAutoReallocate_SingleEntry_FailReSourced__OutOfStock_ResetInventory()
                                                                                       throws java.lang.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:
        java.lang.InterruptedException
      • shouldAutoReallocate_SingleEntry_PartiallyReSourcingSuccess

        public void shouldAutoReallocate_SingleEntry_PartiallyReSourcingSuccess()
                                                                         throws java.lang.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:
        java.lang.InterruptedException
      • shouldAutoReallocate_MixManualAuto_ReSourcingFailed

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

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

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

        public void shouldAutoDecline2Entries_PartiallySuccessReSourced()
                                                                 throws java.lang.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:
        java.lang.InterruptedException
      • shouldAutoDecline1Entry_MultiEntries_SuccessReSourced

        public void shouldAutoDecline1Entry_MultiEntries_SuccessReSourced()
                                                                   throws java.lang.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:
        java.lang.InterruptedException
      • shouldAutoDecline1Entry_MultiEntries_FailReSourced

        public void shouldAutoDecline1Entry_MultiEntries_FailReSourced()
                                                                throws java.lang.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:
        java.lang.InterruptedException
      • shouldAutoReallocate_SingleEntry_FailReSourced__Damaged_ResetInventory

        public void shouldAutoReallocate_SingleEntry_FailReSourced__Damaged_ResetInventory()
                                                                                    throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • shouldManualReallocate_DamagedEntry_BanExternalWarehouse

        public void shouldManualReallocate_DamagedEntry_BanExternalWarehouse()
                                                                      throws java.lang.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:
        java.lang.InterruptedException
      • shouldExcludeBanWarehouseDuringATPCalculation

        public void shouldExcludeBanWarehouseDuringATPCalculation()
                                                           throws java.lang.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:
        java.lang.InterruptedException
      • shouldSuccessfullyAutoReallocateTwice

        public void shouldSuccessfullyAutoReallocateTwice()
                                                   throws java.lang.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:
        java.lang.InterruptedException