Class PromotionGroupTest
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.jalo.AbstractPromotionTest
de.hybris.platform.promotions.jalo.PromotionGroupTest
- All Implemented Interfaces:
JaloSessionHolder
PromotionsTest. Test uses products from hwcatalog version online.
-
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()voidvoidTests mixed promotion scenario: ProductSteppedMultiBuyPromotion + ProductPercentageDiscountPromotion.voidTests ProductPercentageDiscountPromotionvoidTests ProductSteppedMultiBuyPromotionvoidMethods inherited from class de.hybris.platform.promotions.jalo.AbstractPromotionTest
createPromotionDataMethods 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
-
PromotionGroupTest
public PromotionGroupTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testFirstPromotionGroup
- Throws:
JaloPriceFactoryException
-
testSecondPromotionGroup
- Throws:
JaloPriceFactoryException
-
testProductPercentageDiscountPromotion
public void testProductPercentageDiscountPromotion()Tests ProductPercentageDiscountPromotion -
testProductSteppedMultiBuyPromotion
public void testProductSteppedMultiBuyPromotion()Tests ProductSteppedMultiBuyPromotion -
testMixedPromotions
public void testMixedPromotions()Tests mixed promotion scenario: ProductSteppedMultiBuyPromotion + ProductPercentageDiscountPromotion. ProductSteppedMultiBuyPromotion has higher priority, ProductPercentageDiscountPromotion has lower priority. There are 5 items in the cart. First 4 are covered by ProductSteppedMultiBuyPromotion, because the definition of this promotion contains entries for 3 and 4 products - the latter one is taken. The remaining one product is covered by ProductPercentageDiscountPromotion. In the effect total price is composed of two parts: first part is the price for first 4 items, second part is the price for the last item. The first price is determined by the ProductSteppedMultiBuyPromotion promotion's steps definition (it does not depend on product price!), second price is determined by the unit price of the item and the promotion's defined percentage discount.
-