Class CancellationIntegrationTest
- 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.CancellationIntegrationTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest @DirtiesContext(classMode=BEFORE_CLASS) public class CancellationIntegrationTest 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, orderBusinessProcessService, orders, pointsOfService, products, productService, REALLOCATE_CONSIGNMENT_CHOICE, restockConfigs, returnUtil, sourcingBanService, sourcingConfigs, sourcingUtil, stockLevels, stockService, timeOut, users, warehouses, warehouseStockService, workflowActionTemplates, workflowService, workflowTemplates, workflowUtil
-
Fields inherited from class de.hybris.platform.yacceleratorordermanagement.integration.BaseAcceleratorIntegrationTest
flexibleSearchService, springCustomContextLoader
-
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importService
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description CancellationIntegrationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()voidsetUp()voidshouldCancelEntireOrderSuccess_MultiEntry_SingleConsignment()Given an order with 2 entries, and cancel all:
entry 1 : {quantity: 3, product: product1}
entry 2 : {quantity: 3, product: product2}
cancellation:{all}voidshouldCancelEntireOrderSuccess_SingleEntry()Given an order with 1 entries, and cancel:
entry 1 : {quantity: 3, product: product1}voidshouldCancelEntireOrderSuccess_singleEntry_MultiConsignment()Given an order with 1 entries sourced from 2 POS, and cancel all:
entry 1 : {quantity: 3, product: Camera}
cancellation:{all}voidshouldCancelEntireOrderSuccess_SingleEntry_MultiStockLevel()voidshouldCancelEntirePartiallyCancelledOrder_singleEntry()Given 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}voidshouldCancelFail_alreadyShipped()voidshouldCancelOrderSuccess_MultiOrderEntry_OMSE_1446()voidshouldCancelOrderSuccess_NothingToSource()voidshouldCancelOrderSuccess_PartiallySourced_OMSE_1440()voidshouldCancelOrderSuccess_PartiallySourcedANdPartiallyConfirmed_OMSE_1454()voidshouldCancelPartiallyOrderAndResourceSuccess_SingleEntry()Given an order with 1 entries, and cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}voidshouldCancelPartiallyOrderSuccess_SingleEntry()Given an order with 1 entries, and cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}voidshouldCancelPartiallyOrderSuccess_SingleEntry_MultiConsignments()Given 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}voidshouldCancelUnallocatedQuantityFirst_SingleEntry()Given an order with 1 entries, partially sourced, and cancel partially then create shipment
entry 1 : {quantity: 3, product: product1}
cancellation : {quantity: 2, product: product1}voidshouldCompleteCancelPotentialFraudOrderSuccess_SingleEntry()Given an order with 1 entry {quantity: 23, product: product1} and status WAIT_FRAUD_MANUAL_CHECK:
Cancel the order completelyvoidshouldNotCancelMore_SingleEntry()Given an order with 1 entries, and cancel more:
entry 1 : {quantity: 3, product: product1}
cancellation:{quantity:30, product: product1)}voidshouldNotCreateEventWhenCancelPartialOrderFromExternalWarehouse()voidshouldNotCreateEventWhenCancelWholeOrderFromExternalWarehouse()voidshouldPartialCancelPotentialFraudOrderSuccess_SingleEntry()Given 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, setup
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNone
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception- Throws:
java.lang.Exception
-
cleanUp
public void cleanUp()
-
shouldCancelEntireOrderSuccess_SingleEntry
public void shouldCancelEntireOrderSuccess_SingleEntry() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelEntireOrderSuccess_SingleEntry_MultiStockLevel
public void shouldCancelEntireOrderSuccess_SingleEntry_MultiStockLevel() throws java.lang.InterruptedException, OrderCancelException- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldNotCancelMore_SingleEntry
public void shouldNotCancelMore_SingleEntry() throws java.lang.InterruptedException, OrderCancelExceptionGiven an order with 1 entries, and cancel more:
entry 1 : {quantity: 3, product: product1}
cancellation:{quantity:30, product: product1)}- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelEntireOrderSuccess_MultiEntry_SingleConsignment
public void shouldCancelEntireOrderSuccess_MultiEntry_SingleConsignment() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelEntireOrderSuccess_singleEntry_MultiConsignment
public void shouldCancelEntireOrderSuccess_singleEntry_MultiConsignment() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelPartiallyOrderSuccess_SingleEntry
public void shouldCancelPartiallyOrderSuccess_SingleEntry() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelPartiallyOrderSuccess_SingleEntry_MultiConsignments
public void shouldCancelPartiallyOrderSuccess_SingleEntry_MultiConsignments() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelPartiallyOrderAndResourceSuccess_SingleEntry
public void shouldCancelPartiallyOrderAndResourceSuccess_SingleEntry() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelUnallocatedQuantityFirst_SingleEntry
public void shouldCancelUnallocatedQuantityFirst_SingleEntry() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelFail_alreadyShipped
public void shouldCancelFail_alreadyShipped() throws java.lang.InterruptedException, OrderCancelException- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelEntirePartiallyCancelledOrder_singleEntry
public void shouldCancelEntirePartiallyCancelledOrder_singleEntry() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelOrderSuccess_MultiOrderEntry_OMSE_1446
public void shouldCancelOrderSuccess_MultiOrderEntry_OMSE_1446() throws java.lang.InterruptedException, OrderCancelException- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelOrderSuccess_PartiallySourced_OMSE_1440
public void shouldCancelOrderSuccess_PartiallySourced_OMSE_1440() throws java.lang.InterruptedException, OrderCancelException- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelOrderSuccess_NothingToSource
public void shouldCancelOrderSuccess_NothingToSource() throws java.lang.InterruptedException, OrderCancelException- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCancelOrderSuccess_PartiallySourcedANdPartiallyConfirmed_OMSE_1454
public void shouldCancelOrderSuccess_PartiallySourcedANdPartiallyConfirmed_OMSE_1454() throws java.lang.InterruptedException, OrderCancelException- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldPartialCancelPotentialFraudOrderSuccess_SingleEntry
public void shouldPartialCancelPotentialFraudOrderSuccess_SingleEntry() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldCompleteCancelPotentialFraudOrderSuccess_SingleEntry
public void shouldCompleteCancelPotentialFraudOrderSuccess_SingleEntry() throws java.lang.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- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldNotCreateEventWhenCancelWholeOrderFromExternalWarehouse
public void shouldNotCreateEventWhenCancelWholeOrderFromExternalWarehouse() throws java.lang.InterruptedException, OrderCancelException- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
shouldNotCreateEventWhenCancelPartialOrderFromExternalWarehouse
public void shouldNotCreateEventWhenCancelPartialOrderFromExternalWarehouse() throws java.lang.InterruptedException, OrderCancelException- Throws:
java.lang.InterruptedExceptionOrderCancelException
-
-