Package de.hybris.platform.promotions
Class Order2PromotionResultRelationTest
- 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.AbstractPromotionServiceTest
-
- de.hybris.platform.promotions.Order2PromotionResultRelationTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class Order2PromotionResultRelationTest extends AbstractPromotionServiceTest
Tests the relation betweenAbstractOrderModelandPromotionResultModel.
-
-
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 Order2PromotionResultRelationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()voidtestOrderPromotionResultRelationTest()Tests the relation betweenAbstractOrderModelandPromotionResultModel, and betweenPromotionResultModelandAbstractPromotionActionModel.-
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:
setUpin classAbstractPromotionServiceTest- Throws:
java.lang.Exception
-
testOrderPromotionResultRelationTest
public void testOrderPromotionResultRelationTest() throws CalculationExceptionTests the relation betweenAbstractOrderModelandPromotionResultModel, and betweenPromotionResultModelandAbstractPromotionActionModel. See PRO-66 for more details. If promotionsCachingStrategy bean is activated then instead getting promotionResults from db, data is obtained from cache.- adds a product to cart, adds a product promotion, and update promotions for the cart,
- tests both table sizes before and after the updatePromotion method call,
- adds an order promotion, and update promotion for the cart again,
- tests both table sizes again,
- creates an order from cart without updatePromotion method call, and tests both table sizes,
- removes the cart, and tests both table sizes,
- updates promotion for the order, and tests its table size,
- removes the order, and tests both table sizes.
- Throws:
CalculationException
-
-