Class AbstractRuleEngineServicesTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.droolsruleengineservices.impl.AbstractRuleEngineServicesTest
- All Implemented Interfaces:
JaloSessionHolder
- Direct Known Subclasses:
CustomAgendaFilterSupportIT,DefaultDroolsEngineServiceTest,DefaultDroolsRuleMaintenanceServiceTest,DefaultRAOActionTest,DefaultValidationAndOutputEncodingITTest,DroolsRuleValidationTest
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe default rule engine context used for tests (see corresponding impex file)static final Stringstatic final StringFields 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 TypeMethodDescriptionprotected CartModelcreates a non-persistent cart with no entries and default currency USD.protected CartModelcreates a non-persistent not-empty cart with default currency USD.protected Setprotected Setprotected CartRAOcreateCartRAO(String code, String currencyIso) protected DeliveryModeRAOcreateDeliveryModeRAO(String code, String cost, String currencyIsoCode) protected OrderEntryRAOcreateOrderEntryRAO(CartRAO cartRao, String basePrice, String currencyIso, int quantity, int entryNumber) protected OrderEntryRAOcreateOrderEntryRAO(String basePrice, String currencyIso, int quantity, int entryNumber) protected RuleEvaluationResultprotected RuleEvaluationResultevaluateAndFailOnError(Set<Object> facts) protected RuleEngineServiceprotected DroolsKIEBaseDaoprotected EngineRuleDaoprotected org.kie.api.KieBasegetKieBase(DroolsRuleEngineContextModel context) protected DroolsKIEBaseModelprotected MediaServiceprotected ModelServiceprotected RuleEngineServiceprotected org.kie.api.builder.ReleaseIdgetReleaseId(DroolsRuleEngineContextModel context) protected RuleEngineCalculationServiceprotected RuleEngineContextDaoprotected DroolsRuleModelprotected DroolsRuleModelgetRuleForFile(String fileName, String path, String packageName, Map<String, String> globals, RuleType ruleType) protected RulesModuleDaoprotected DroolsKIEModuleModelgetTestRulesModule(Set<DroolsRuleModel> rules) protected voidprotected voidinitializeRuleEngine(DroolsRuleModel... rules) protected RuleEvaluationContextprepareContext(Set<Object> facts) provideRAOs(FactContext factContext) protected StringreadRuleFile(String fileName, String path) protected Set<OrderEntryRAO>set(OrderEntryRAO... entries) 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
-
Field Details
-
RULE_ENGINGE_CONTEXT_NAME
the default rule engine context used for tests (see corresponding impex file)- See Also:
-
RULE_ENGINGE_KBASE_JUNIT
- See Also:
-
RULE_ENGINGE_KMODULE_JUNIT
- See Also:
-
-
Constructor Details
-
AbstractRuleEngineServicesTest
public AbstractRuleEngineServicesTest()
-
-
Method Details
-
provideRAOs
-
buildRAOsForNotEmptyCartWithCode
-
buildRAOsForCartWithCode
-
prepareContext
-
evaluate
-
evaluateAndFailOnError
-
buildCartWithCodeAndCurrency
creates a non-persistent cart with no entries and default currency USD.- Parameters:
code- the code to use- Returns:
- the CartModel
-
buildNotEmptyCartWithCodeAndCurrency
creates a non-persistent not-empty cart with default currency USD.- Parameters:
code- the code to use- Returns:
- the CartModel
-
getRuleForFile
protected DroolsRuleModel getRuleForFile(String fileName, String path, String packageName, Map<String, String> globals) throws IOException- Throws:
IOException
-
getRuleForFile
protected DroolsRuleModel getRuleForFile(String fileName, String path, String packageName, Map<String, String> globals, RuleType ruleType) throws IOException- Throws:
IOException
-
readRuleFile
- Throws:
IOException
-
getTestRulesModule
-
initializeRuleEngine
-
initializeRuleEngine
-
getKieBase
-
getReleaseId
-
createCartRAO
-
createOrderEntryRAO
protected OrderEntryRAO createOrderEntryRAO(String basePrice, String currencyIso, int quantity, int entryNumber) -
createDeliveryModeRAO
-
createOrderEntryRAO
protected OrderEntryRAO createOrderEntryRAO(CartRAO cartRao, String basePrice, String currencyIso, int quantity, int entryNumber) -
getKieBaseOrCreateNew
-
set
-
getModelService
-
getRuleEngineCalculationService
-
getCommerceRuleEngineService
-
getPlatformRuleEngineService
-
getRuleEngineContextDao
-
getEngineRuleDao
-
getMediaService
-
getRulesModuleDao
-
getDroolsKIEBaseDao
-