Package de.hybris.platform.promotions
Class ProductBundlePromotionTest
- 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.ProductBundlePromotionTest
-
- All Implemented Interfaces:
JaloSessionHolder
public class ProductBundlePromotionTest extends AbstractPromotionTest
Test for ProductBundlePromotion.
-
-
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 ProductBundlePromotionTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
void
testProductBundlePromotion()
HW1210-3411: 253 Euro, HW1100-0023: 523.99 Euro, HW2310-1001: 29.90 Euro, and HW2320-1009: 99.80 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
-
testProductBundlePromotion
public void testProductBundlePromotion() throws CalculationException
HW1210-3411: 253 Euro, HW1100-0023: 523.99 Euro, HW2310-1001: 29.90 Euro, and HW2320-1009: 99.80 Euro. Adds all these products to cart, and check the price of the cart before and after the updatePromoitions(). The bundle promotion defines the combination of three products: [HW1210-3411, HW1100-0023, and HW2310-1001], and the price is 700 Euro.- tests the total price, 2 * 253 + 2 * 523.99 + 3 * 29.90 + 2 * 99.80 = 1843.28,
- update promotion, and since only HW2310-1001 has the quantity of 3, the last one will not be considered in the promotion,
- tests the total price, should be: 2 * 700 + 1 * 29.90 + 2 * 99.80 = 1629.5.
- Throws:
CalculationException
-
-