Package de.hybris.platform.promotions
Class OrderPromotionWithProductRestrictionTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.servicelayer.ServicelayerTransactionalTest
-
- de.hybris.platform.promotions.AbstractPromotionServiceTest
-
- de.hybris.platform.promotions.OrderPromotionWithProductRestrictionTest
-
- All Implemented Interfaces:
JaloSessionHolder
public class OrderPromotionWithProductRestrictionTest extends AbstractPromotionServiceTest
Tests whether order promotion should be applied with product restriction under different circumstances.
-
-
Field Summary
-
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 OrderPromotionWithProductRestrictionTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()voidtestMoreProductsOrderPromotionWithoutRestriction()Creates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains proudct2 which is not restricted.voidtestMoreProductsOrderPromotionWithRestriction()Creates an orderThresholdFreeGiftPromotion WITH product restriction, and the cart contains proudct2 which is not restricted, so the free gift product should be added to the cart.voidtestOrderPromotionWithoutRestriction()Creates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains only product1 which is restricted.voidtestOrderPromotionWithRestriction()Creates an orderThresholdFreeGiftPromotion WITH product restriction, and the cart contains only product1 which is restricted.-
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- Overrides:
setUpin classAbstractPromotionServiceTest- Throws:
java.lang.Exception
-
testOrderPromotionWithoutRestriction
public void testOrderPromotionWithoutRestriction() throws CalculationExceptionCreates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains only product1 which is restricted. The free gift product should still be added to the cart.- Throws:
CalculationException
-
testOrderPromotionWithRestriction
public void testOrderPromotionWithRestriction() throws CalculationExceptionCreates an orderThresholdFreeGiftPromotion WITH product restriction, and the cart contains only product1 which is restricted. This time, the free gift product should NOT be added to the cart.- Throws:
CalculationException
-
testMoreProductsOrderPromotionWithoutRestriction
public void testMoreProductsOrderPromotionWithoutRestriction() throws CalculationExceptionCreates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains proudct2 which is not restricted. The free gift product should be added to the cart.- Throws:
CalculationException
-
testMoreProductsOrderPromotionWithRestriction
public void testMoreProductsOrderPromotionWithRestriction() throws CalculationExceptionCreates an orderThresholdFreeGiftPromotion WITH product restriction, and the cart contains proudct2 which is not restricted, so the free gift product should be added to the cart.- Throws:
CalculationException
-
-