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
Test for ProductMultiBuyPromotion.
-
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()voidHW1210-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, 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
-
ProductMultiBuyPromotionTest
public ProductMultiBuyPromotionTest()
-
-
Method Details
-
setUp
- Overrides:
setUpin classAbstractPromotionTest- Throws:
Exception
-
testProductMultiBuyPromotion
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
-