Class DefaultCommerceCartCalculationStrategyIntegrationTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.commerceservices.order.DefaultCommerceCartCalculationStrategyIntegrationTest
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest
public class DefaultCommerceCartCalculationStrategyIntegrationTest
extends ServicelayerTest
Integration test suite(product discount and delivery cost threshold settings ) for
DefaultCommerceCartCalculationStrategy-
Field Summary
Fields 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 TypeMethodDescriptionprotected voidthe OriginalCart was loaded from test impex data, the cart has already contained 2 products and every product has its' price, tax.protected voidhere simulate the process of re-add products to Cart with already setting delivery mode in cart, by adjust the order entry quantity with the entry's initial quantity, resetting entry's quantity with same quantity can trigger cartModel.setCalculated(false).voidreset()voidsetUp()voidvoidvoidvoidvoidMethods 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
-
DefaultCommerceCartCalculationStrategyIntegrationTest
public DefaultCommerceCartCalculationStrategyIntegrationTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
reset
- Throws:
Exception
-
shouldNotChangeOrderFeesWhenCallCalculateCartAgain
- Throws:
CalculationException
-
shouldGetNoReSetOrderFeesWhenCallCalculateCartAgainAfterReAddToCart
public void shouldGetNoReSetOrderFeesWhenCallCalculateCartAgainAfterReAddToCart() throws CalculationException- Throws:
CalculationException
-
shouldGetReSetOrderFeesWhenCallCalculateCartAgainWithEnableReSetDeliveryCostAfterReAddToCart
public void shouldGetReSetOrderFeesWhenCallCalculateCartAgainWithEnableReSetDeliveryCostAfterReAddToCart() throws CalculationException- Throws:
CalculationException
-
shouldGetNoReSetOrderFeesWhenCallRecalculateCartInOccPlaceOrderApiWithOutEnableReSetDeliveryCost
public void shouldGetNoReSetOrderFeesWhenCallRecalculateCartInOccPlaceOrderApiWithOutEnableReSetDeliveryCost() throws CalculationException- Throws:
CalculationException
-
shouldGetReSetOrderFeesWhenCallRecalculateCartInOccPlaceOrderApiWithEnableReSetDeliveryCost
public void shouldGetReSetOrderFeesWhenCallRecalculateCartInOccPlaceOrderApiWithEnableReSetDeliveryCost() throws CalculationException- Throws:
CalculationException
-
reAddProductToCartWithDeliveryModeInCart
here simulate the process of re-add products to Cart with already setting delivery mode in cart, by adjust the order entry quantity with the entry's initial quantity, resetting entry's quantity with same quantity can trigger cartModel.setCalculated(false). or we can just cartModel.setCalculated(false) directly. for order entry,setCalulacted(false) + modelService.save(entry) can not trigger cartModel.setCalculated(false)- Parameters:
cartModel-
-
prepareAndCalculateCartWithDeliveryCostWorking
protected void prepareAndCalculateCartWithDeliveryCostWorking()the OriginalCart was loaded from test impex data, the cart has already contained 2 products and every product has its' price, tax. and also simulate the process of addToCart and checkout
-