Class DefaultPromotionEngineServiceTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.promotionengineservices.promotionengine.impl.PromotionEngineServiceBaseTest
-
- de.hybris.platform.promotionengineservices.promotionengine.impl.DefaultPromotionEngineServiceTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class DefaultPromotionEngineServiceTest extends PromotionEngineServiceBaseTest
-
-
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 DefaultPromotionEngineServiceTest()
-
Method Summary
-
Methods inherited from class de.hybris.platform.promotionengineservices.promotionengine.impl.PromotionEngineServiceBaseTest
getDroolsKIEBaseDao, getKieBaseModel, getPromotionEngineService, readRuleFile
-
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 ImpExException, java.io.IOException
- Throws:
ImpExException
java.io.IOException
-
testEvaluation
public void testEvaluation() throws java.io.IOException
- Throws:
java.io.IOException
-
testEvaluationWithActualDate
public void testEvaluationWithActualDate() throws java.io.IOException
- Throws:
java.io.IOException
-
testEvaluationWithNotActualDate
public void testEvaluationWithNotActualDate() throws java.io.IOException
- Throws:
java.io.IOException
-
testTransferCartToOrderUpdateRule
public void testTransferCartToOrderUpdateRule() throws java.io.IOException
- Throws:
java.io.IOException
-
testTransferCartWithPromotionsForEntries
public void testTransferCartWithPromotionsForEntries() throws java.io.IOException
- Throws:
java.io.IOException
-
testTransferCartToOrderTheSameRule
public void testTransferCartToOrderTheSameRule() throws java.io.IOException
- Throws:
java.io.IOException
-
testMultiplePromotionGroups
public void testMultiplePromotionGroups() throws java.io.IOException
- Throws:
java.io.IOException
-
testNoCatalogVersionPromotionFromSession
public void testNoCatalogVersionPromotionFromSession() throws java.io.IOException
- Throws:
java.io.IOException
-
testEmptyCartRuleEngineContextIsUnique
public void testEmptyCartRuleEngineContextIsUnique() throws java.io.IOException
- Throws:
java.io.IOException
-
testEmptyCartRuleEngineContextIsNotUnique
public void testEmptyCartRuleEngineContextIsNotUnique() throws java.io.IOException
- Throws:
java.io.IOException
-
getRuleForFile
protected AbstractRuleEngineRuleModel getRuleForFile(java.lang.String fileName, java.lang.String path) throws java.io.IOException
Creates a (non-persisted) AbstractRuleEngineRuleModel based on the given file and path. Note that this implementation assumes that the fileName matches the rule's name (excluding the .drl extension).- Parameters:
fileName
-path
-- Returns:
- new AbstractRuleEngineRuleModel
- Throws:
java.io.IOException
-
buildCartForUserWithCodeProductAndCurrency
protected CartModel buildCartForUserWithCodeProductAndCurrency(java.lang.String code, java.lang.String productCode, int items)
-
buildCartForUserWithCodeAndCurrency
protected CartModel buildCartForUserWithCodeAndCurrency(java.lang.String code, java.lang.String productCode)
-
buildCartWithCodeAndCurrency
protected CartModel buildCartWithCodeAndCurrency(java.lang.String code)
-
buildCartWithCodeProductAndCurrency
protected CartModel buildCartWithCodeProductAndCurrency(java.lang.String code, java.lang.String productCode, int items)
-
setCurrency
protected void setCurrency(CartModelBuilder.CartModelDraft cartModelDraft, java.lang.String isoCode)
-
initializeRuleEngine
protected void initializeRuleEngine(AbstractRuleEngineRuleModel... rules)
-
getOnlineCatalogVersion
protected CatalogVersionModel getOnlineCatalogVersion()
-
getPromoGroup
protected java.util.List<PromotionGroupModel> getPromoGroup(java.lang.String code)
-
getModelService
protected ModelService getModelService()
-
getCommerceRuleEngineService
protected RuleEngineService getCommerceRuleEngineService()
-
getRuleEngineContextDao
protected RuleEngineContextDao getRuleEngineContextDao()
-
getMediaService
protected MediaService getMediaService()
-
getCatalogVersionDao
protected CatalogVersionDao getCatalogVersionDao()
-
-