Class OrderSourcingIntegrationTest
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.OrderSourcingIntegrationTest
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest
public class OrderSourcingIntegrationTest
extends BaseAcceleratorSourcingIntegrationTest
-
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()voidvoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify cannot confirm order twicevoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
TheBaseStoreModelfor the Order does not haveSourcingConfigModel.voidGiven 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.voidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify the order sourcing failedvoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify the location where it is assignedvoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify the location where it is assignedvoidvoidGiven 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 resultvoidGiven 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 resultvoidGiven 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 resultvoidGiven 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 TorontovoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify the order status and consignment resultvoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify the order status and consignment resultvoidGiven an pickup order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify the order status and consignment resultvoidGiven an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
In this case, both locations cannot send order at one time.voidGiven 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.voidGiven that a consignment is Packed the Task Assignment Workflow must also be updated.voidGiven that a consignment is Packed the Task Assignment Workflow must also be updated.voidGiven that a pickup consignment is Shipped the Task Assignment Workflow must also be updated.voidGiven that a consignment is Shipped the Task Assignment Workflow must also be updated.Methods 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
-
OrderSourcingIntegrationTest
public OrderSourcingIntegrationTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
cleanUp
public void cleanUp() -
updateTaskAssignmentWorkflowWithPackShippingConsignment
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
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
Given that a consignment is Shipped the Task Assignment Workflow must also be updated. Result: The task assignment workflow is terminated- Throws:
InterruptedException
-
updateTaskAssignmentWorkflowWithPickupConsignment
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
Given an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify the order status and consignment result- Throws:
InterruptedException
-
shouldNotSourceSourcingConfigNull
Given an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
TheBaseStoreModelfor the Order does not haveSourcingConfigModel.
So the sourcing fails and order status changes to Suspended.
Later aSourcingConfigModelis provided for theBaseStoreModel, 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
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
Given an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify the order sourcing failed- Throws:
InterruptedException
-
shouldSourcingSuccess_Priority
Given an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify the order status and consignment result- Throws:
InterruptedException
-
shouldPickLocationWithLowerScore
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
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
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
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
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
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
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 InterruptedExceptionGiven 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
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
Given an shipping order with 1 entries:
entry 1 : {quantity: 3, product: camera}
Result:
Verify cannot confirm order twice- Throws:
InterruptedException
-
shouldSourcingSuccess_ExternalWarehouse
- Throws:
InterruptedException
-
shouldFailSourcing_ExternalWarehouse
- Throws:
InterruptedException
-