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
Tests whether order promotion should be applied with product restriction under different circumstances.
-
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 TypeMethodDescriptionvoidsetUp()voidCreates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains proudct2 which is not restricted.voidCreates 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.voidCreates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains only product1 which is restricted.voidCreates 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, 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
-
OrderPromotionWithProductRestrictionTest
public OrderPromotionWithProductRestrictionTest()
-
-
Method Details
-
setUp
- Overrides:
setUpin classAbstractPromotionServiceTest- Throws:
Exception
-
testOrderPromotionWithoutRestriction
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
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
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
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
-