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
public class PromotionGroupTest extends AbstractPromotionTest
PromotionsTest. Test uses products from hwcatalog version online.
-
-
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 PromotionGroupTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
void
testFirstPromotionGroup()
void
testMixedPromotions()
Tests mixed promotion scenario: ProductSteppedMultiBuyPromotion + ProductPercentageDiscountPromotion.void
testProductPercentageDiscountPromotion()
Tests ProductPercentageDiscountPromotionvoid
testProductSteppedMultiBuyPromotion()
Tests ProductSteppedMultiBuyPromotionvoid
testSecondPromotionGroup()
-
Methods inherited from class de.hybris.platform.promotions.jalo.AbstractPromotionTest
createPromotionData
-
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
- Throws:
java.lang.Exception
-
testFirstPromotionGroup
public void testFirstPromotionGroup() throws JaloPriceFactoryException
- Throws:
JaloPriceFactoryException
-
testSecondPromotionGroup
public void testSecondPromotionGroup() throws JaloPriceFactoryException
- 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.
-
-