Class CancellationIntegrationTest
- All Implemented Interfaces:
JaloSessionHolder
-
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, orderBusinessProcessService, orders, pointsOfService, products, productService, 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 order with 2 entries, and cancel all:
entry 1 : {quantity: 3, product: product1}
entry 2 : {quantity: 3, product: product2}
cancellation:{all}voidGiven an order with 1 entries, and cancel:
entry 1 : {quantity: 3, product: product1}voidGiven an order with 1 entries sourced from 2 POS, and cancel all:
entry 1 : {quantity: 3, product: Camera}
cancellation:{all}voidvoidGiven an order with 1 entries, cancel entire order which already has been partially cancelled
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 1, product: product1}
cancellation : {quantity: 2, product: product1}voidvoidvoidvoidvoidvoidGiven an order with 1 entries, and cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}voidvoidvoidGiven an order with 1 entries, and cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}voidGiven an order with 1 entry and 2 consigments, then cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}voidGiven an order with 1 entries, partially sourced, and cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}voidGiven an order with 1 entry {quantity: 23, product: product1} and status WAIT_FRAUD_MANUAL_CHECK:
Cancel the order completelyvoidGiven an order with 1 entries, and cancel more:
entry 1 : {quantity: 3, product: product1}
cancellation:{quantity:30, product: product1)}voidvoidvoidGiven an order with 1 entry {quantity: 23, product: product1} and status WAIT_FRAUD_MANUAL_CHECK:
Partial Cancel : {quantity: 3, product: product1}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
-
CancellationIntegrationTest
public CancellationIntegrationTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
cleanUp
public void cleanUp() -
shouldCancelEntireOrderSuccess_SingleEntry
public void shouldCancelEntireOrderSuccess_SingleEntry() throws InterruptedException, OrderCancelExceptionGiven an order with 1 entries, and cancel:
entry 1 : {quantity: 3, product: product1}
Result:
consignment should be cancelled
Assert:
It verifies the cancellation result -
shouldCancelEntireOrderSuccess_SingleEntry_MultiStockLevel
public void shouldCancelEntireOrderSuccess_SingleEntry_MultiStockLevel() throws InterruptedException, OrderCancelException -
shouldNotCancelMore_SingleEntry
Given an order with 1 entries, and cancel more:
entry 1 : {quantity: 3, product: product1}
cancellation:{quantity:30, product: product1)} -
shouldCancelEntireOrderSuccess_MultiEntry_SingleConsignment
public void shouldCancelEntireOrderSuccess_MultiEntry_SingleConsignment() throws InterruptedException, OrderCancelExceptionGiven an order with 2 entries, and cancel all:
entry 1 : {quantity: 3, product: product1}
entry 2 : {quantity: 3, product: product2}
cancellation:{all}Result:
consignment should be cancelled
Assert:
It verifies the cancellation result -
shouldCancelEntireOrderSuccess_singleEntry_MultiConsignment
public void shouldCancelEntireOrderSuccess_singleEntry_MultiConsignment() throws InterruptedException, OrderCancelExceptionGiven an order with 1 entries sourced from 2 POS, and cancel all:
entry 1 : {quantity: 3, product: Camera}
cancellation:{all}Result:
consignment should be cancelled
Assert:
It verifies the cancellation result -
shouldCancelPartiallyOrderSuccess_SingleEntry
public void shouldCancelPartiallyOrderSuccess_SingleEntry() throws InterruptedException, OrderCancelExceptionGiven an order with 1 entries, and cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}
Result:
1 shipment should be created with quantity 1
Assert:
It verifies the shipment result -
shouldCancelPartiallyOrderSuccess_SingleEntry_MultiConsignments
public void shouldCancelPartiallyOrderSuccess_SingleEntry_MultiConsignments() throws InterruptedException, OrderCancelExceptionGiven an order with 1 entry and 2 consigments, then cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}
Result:
generate a new optimized consignment
Assert:
It verifies the shipment result -
shouldCancelPartiallyOrderAndResourceSuccess_SingleEntry
public void shouldCancelPartiallyOrderAndResourceSuccess_SingleEntry() throws InterruptedException, OrderCancelExceptionGiven an order with 1 entries, and cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}
Result:
1 shipment should be created with quantity 1
Assert:
It verifies a new consignment create from better location -
shouldCancelPartiallyOrderSuccess_MultiEntry_SingleConsignment_MultiTimes
public void shouldCancelPartiallyOrderSuccess_MultiEntry_SingleConsignment_MultiTimes() throws InterruptedException, OrderCancelException -
shouldCancelPartiallyOrderSuccess_MultiEntry_MultiConsignments_MultiTimes
public void shouldCancelPartiallyOrderSuccess_MultiEntry_MultiConsignments_MultiTimes() throws InterruptedException, OrderCancelException -
shouldCancelUnallocatedQuantityFirst_SingleEntry
public void shouldCancelUnallocatedQuantityFirst_SingleEntry() throws InterruptedException, OrderCancelExceptionGiven an order with 1 entries, partially sourced, and cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}
Result:
1 shipment should be created with quantity 1
Assert:
It cancel unallocated quantity without modify consignment -
shouldCancelFail_alreadyShipped
-
shouldCancelEntirePartiallyCancelledOrder_singleEntry
public void shouldCancelEntirePartiallyCancelledOrder_singleEntry() throws InterruptedException, OrderCancelExceptionGiven an order with 1 entries, cancel entire order which already has been partially cancelled
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 1, product: product1}
cancellation : {quantity: 2, product: product1}
Result:
order should be cancel complete
Assert:
order status in cancel -
shouldCancelOrderSuccess_MultiOrderEntry_OMSE_1446
public void shouldCancelOrderSuccess_MultiOrderEntry_OMSE_1446() throws InterruptedException, OrderCancelException -
shouldCancelOrderSuccess_PartiallySourced_OMSE_1440
public void shouldCancelOrderSuccess_PartiallySourced_OMSE_1440() throws InterruptedException, OrderCancelException -
shouldCancelOrderSuccess_NothingToSource
public void shouldCancelOrderSuccess_NothingToSource() throws InterruptedException, OrderCancelException -
shouldCancelOrderSuccess_PartiallySourcedANdPartiallyConfirmed_OMSE_1454
public void shouldCancelOrderSuccess_PartiallySourcedANdPartiallyConfirmed_OMSE_1454() throws InterruptedException, OrderCancelException -
shouldPartialCancelPotentialFraudOrderSuccess_SingleEntry
public void shouldPartialCancelPotentialFraudOrderSuccess_SingleEntry() throws InterruptedException, OrderCancelExceptionGiven an order with 1 entry {quantity: 23, product: product1} and status WAIT_FRAUD_MANUAL_CHECK:
Partial Cancel : {quantity: 3, product: product1}
Result:
Order status should still be WAIT_FRAUD_MANUAL_CHECK, while the order entry's quantity get reduced by 3
Assert:
It verifies the cancellation result -
shouldCompleteCancelPotentialFraudOrderSuccess_SingleEntry
public void shouldCompleteCancelPotentialFraudOrderSuccess_SingleEntry() throws InterruptedException, OrderCancelExceptionGiven an order with 1 entry {quantity: 23, product: product1} and status WAIT_FRAUD_MANUAL_CHECK:
Cancel the order completelyResult:
Order status should be Cancelled, while the order process moves to end state
Assert:
It verifies the cancellation result -
shouldNotCreateEventWhenCancelWholeOrderFromExternalWarehouse
public void shouldNotCreateEventWhenCancelWholeOrderFromExternalWarehouse() throws InterruptedException, OrderCancelException -
shouldNotCreateEventWhenCancelPartialOrderFromExternalWarehouse
public void shouldNotCreateEventWhenCancelPartialOrderFromExternalWarehouse() throws InterruptedException, OrderCancelException
-