Package de.hybris.platform.promotions
Class ProductMultiBuyPromotionTest
- 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.AbstractPromotionTest
-
- de.hybris.platform.promotions.ProductMultiBuyPromotionTest
-
- All Implemented Interfaces:
JaloSessionHolder
public class ProductMultiBuyPromotionTest extends AbstractPromotionTest
Test for ProductMultiBuyPromotion.
-
-
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 ProductMultiBuyPromotionTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
void
testProductMultiBuyPromotion()
HW1210-3411: 253.0 Euro, HW1100-0023: 523.99 Euro, and HW2310-1001: 29.90 Euro.-
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 classAbstractPromotionTest
- Throws:
java.lang.Exception
-
testProductMultiBuyPromotion
public void testProductMultiBuyPromotion() throws CalculationException
HW1210-3411: 253.0 Euro, HW1100-0023: 523.99 Euro, and HW2310-1001: 29.90 Euro. The ProductMultiBuyPromotion will be fired if at least 3 pieces of HW1210-3411 and/or HW1100-0023 are in the cart for 900 Euro.- adds one piece of all those products in cart, and tests the total price,
- adds one more HW1210-3411 and HW1100-0023 in cart, and tests the total price again,
- updates with the ProductMultiBuyPromotion, and checks the total price,
- in ProductMultiBuyPromotion, the product with lowest price will be first consumed,
- so two HW1210-3411 and one HW1100-0023 are valid for the ProductMultiBuyPromotion under this situation,
- checks the total price: 900 + 523.99 + 29.90 = 1453.89.
- Throws:
CalculationException
-
-