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 void
setUp()
void
testMoreProductsOrderPromotionWithoutRestriction()
Creates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains proudct2 which is not restricted.void
testMoreProductsOrderPromotionWithRestriction()
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.void
testOrderPromotionWithoutRestriction()
Creates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains only product1 which is restricted.void
testOrderPromotionWithRestriction()
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:
setUp
in classAbstractPromotionServiceTest
- Throws:
java.lang.Exception
-
testOrderPromotionWithoutRestriction
public void testOrderPromotionWithoutRestriction() throws CalculationException
Creates 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 CalculationException
Creates 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 CalculationException
Creates 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 CalculationException
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.- Throws:
CalculationException
-
-