Class DeclineIntegrationTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.yacceleratorordermanagement.integration.BaseAcceleratorIntegrationTest
de.hybris.platform.yacceleratorordermanagement.integration.BaseAcceleratorSourcingIntegrationTest
de.hybris.platform.yacceleratorordermanagement.integration.DeclineIntegrationTest
- All Implemented Interfaces:
JaloSessionHolder
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.
-
Field Summary
Fields inherited from class de.hybris.platform.yacceleratorordermanagement.integration.BaseAcceleratorSourcingIntegrationTest
atpFormulas, automatedWorkflowActionTemplates, baseStores, CAMERA_CODE, CAMERA_QTY, cancellationUtil, CODE_BOSTON, CODE_MEMORY_CARD, CODE_MONTREAL, CODE_MONTREAL_EXTERNAL, CODE_PARIS, CODE_TORONTO, commentTypes, commerceStockService, components, CONSIGNMENT_ACTION_EVENT_NAME, csAgentGroups, DECLINE_ENTRIES, declineUtil, deliveryMode, domains, emailAddresses, LEFTOVER_QTY, LENS_CODE, LENS_QTY, MEMORY_CARD_CODE, MEMORY_CARD_QTY, modelService, order, ORDER_ACTION_EVENT_NAME, orderBusinessProcessService, orders, pointsOfService, products, productService, RE_SOURCE_CHOICE, REALLOCATE_CONSIGNMENT_CHOICE, restockConfigs, returnUtil, sourcingBanService, sourcingConfigs, sourcingUtil, stockLevels, stockService, timeOut, users, warehouses, warehouseStockService, workflowActionTemplates, workflowService, workflowTemplates, workflowUtilFields inherited from class de.hybris.platform.yacceleratorordermanagement.integration.BaseAcceleratorIntegrationTest
flexibleSearchService, springCustomContextLoaderFields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()voidsetUp()voidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
partially decline same consignment twicevoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Decline should SUCCESS without sufficient stock twicevoidGiven an shipping order with 2 entries:
entry 1 : {quantity: 3, product: camera}
entry 2 : {quantity: 2, product: memoryCard}
Result:
Decline should FailvoidGiven an shipping order with 2 entries:
entry 1 : {quantity: 3, product: camera}
entry 2 : {quantity: 2, product: memoryCard}
Result:
Decline should SUCCESS, and confirm ordervoidGiven an shipping order with 2 entries:
entry 1 : {quantity: 3, product: camera}
entry 2 : {quantity: 2, product: memoryCard}
Result:
Decline should SUCCESSvoidGiven an shipping order with 3 entries:
DeclineEntry 1 : auto
DeclineEntry 2 : manual
Result:
Decline should SUCCESSvoidvoidGiven 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 inventoryvoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Decline should fail, and confirm the consignmentvoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Decline should SUCCESS with new location when partially reallocatedvoidGiven 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 locationvoidGiven 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 consignmentvoidGiven 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 toConsignmentStatus.READYfromConsignmentStatus.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.voidGiven 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 0voidGiven 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 dayvoidGiven 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 locationvoidGiven 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 consignmentvoidGiven 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 toConsignmentStatus.READYfromConsignmentStatus.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.voidGiven 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 actionsMethods inherited from class de.hybris.platform.yacceleratorordermanagement.integration.BaseAcceleratorSourcingIntegrationTest
buildAsnWorkflow, buildConsignmentWorkflow, cleanUpData, cleanUpModel, refreshConsignmentAndEntries, resetFactors, saveAll, setupMethods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Constructor Details
-
DeclineIntegrationTest
public DeclineIntegrationTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
cleanUp
public void cleanUp() -
shouldAutoReallocate_SingleEntry_SuccessReSourced__ToBusy_BanLocation
public void shouldAutoReallocate_SingleEntry_SuccessReSourced__ToBusy_BanLocation() throws InterruptedExceptionGiven 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
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 InterruptedExceptionGiven 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 InterruptedExceptionGiven 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 toConsignmentStatus.READYfromConsignmentStatus.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 InterruptedExceptionGiven 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 InterruptedExceptionGiven 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 toConsignmentStatus.READYfromConsignmentStatus.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
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 InterruptedExceptionGiven 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 InterruptedExceptionGiven 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
Given an shipping order with 3 entries:
DeclineEntry 1 : auto
DeclineEntry 2 : manual
Result:
Decline should SUCCESS- Throws:
InterruptedException
-
shouldAutoDecline_SuccessReSourcedTwice
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
Given an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
partially decline same consignment twice- Throws:
InterruptedException
-
shouldAutoDecline2Entries_PartiallySuccessReSourced
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
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
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
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
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
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
-