Class ProductConfigRulesTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.sap.productconfig.services.integrationtests.CPQServiceLayerTest
-
- de.hybris.platform.sap.productconfig.rules.integrationtests.ProductConfigRulesTest
-
- All Implemented Interfaces:
JaloSessionHolder
- Direct Known Subclasses:
CharacteristicValueRulesResultHandlerIntegrationTest
,ProductConfigRulesCPSIntegrationTest
,ProductConfigRulesIntegrationTest
public abstract class ProductConfigRulesTest extends CPQServiceLayerTest
Base test class for rules related integration tests
-
-
Field Summary
Fields Modifier and Type Field Description protected CommerceCartService
commerceCartService
protected static java.lang.String
CPQ_CPU
protected static java.lang.String
CPQ_DISPLAY
protected static java.lang.String
CPQ_DISPLAY_13
protected static java.lang.String
CPQ_DISPLAY_15
protected static java.lang.String
CPQ_DISPLAY_17
protected static java.lang.String
CPQ_HT_SPK_COLOR
protected static java.lang.String
CPQ_HT_SPK_MODEL
protected static java.lang.String
CPQ_HT_SURROUND_MODE
protected static java.lang.String
CPQ_MONITOR
protected static java.lang.String
CPQ_MONITOR_21
protected static java.lang.String
CPQ_MONITOR_24
protected static java.lang.String
CPQ_MONITOR_24HD
protected static java.lang.String
CPQ_MONITOR_27
protected static java.lang.String
CPQ_OS
protected static java.lang.String
CPQ_RAM
protected static java.lang.String
CPQ_SECURITY
protected static java.lang.String
CPQ_SOFTWARE
protected static java.lang.String
EXP_NUMBER
protected static java.lang.String
EXPECTED_MESSAGE
protected java.lang.String
expectedMessage
protected static java.lang.String
INTELI5_35
protected static java.lang.String
INTELI7_40
protected static java.lang.String
LINUSDEBIAN
protected static java.lang.String
MS10
protected static java.lang.String
NORTON
protected static java.lang.String
PAINTER
protected ProductService
productService
protected ProductConfigCartRAOPopulator
raoPopulator
protected ProductConfigurationServiceImpl
ruleAwareService
protected RuleMaintenanceService
ruleMaintenanceService
protected static java.lang.String
STEREO
protected static java.lang.String
SURROUND
protected static java.lang.String
YM_NS_F160
protected static java.lang.String
YSAP_POC_SIMPLE_FLAG
-
Fields inherited from class de.hybris.platform.sap.productconfig.services.integrationtests.CPQServiceLayerTest
authenticationService, baseSiteService, baseStoreService, cartService, catalogVersionService, configurationLifecycleStrategy, configurationProductUtil, cpqAbstractOrderEntryLinkStrategy, cpqService, cpqServiceNoRules, customerModel, flexibleSearchService, i18NService, KB_CPQ_HOME_THEATER, KB_CPQ_LAPTOP, KB_CPQ_LAPTOP_MUSIC, KB_Y_SAP_SIMPLE_POC, modelService, PRODUCT_CODE_CONF_PIPE, PRODUCT_CODE_CPQ_HOME_THEATER, PRODUCT_CODE_CPQ_LAPTOP, PRODUCT_CODE_CPQ_LAPTOP_MUSIC, PRODUCT_CODE_CPQ_LAPTOP_MUZAC, PRODUCT_CODE_YSAP_NOCFG, PRODUCT_CODE_YSAP_SIMPLE_POC, productConfigurationCacheAccessService, providerFactory, realUserService, serviceConfigValueHelper, TEST_CONFIGURE_SITE
-
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 ProductConfigRulesTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addConfigurationToCart(ConfigModel configModel, KBKey kbKey)
protected void
assertNoMessage(ConfigModel config)
protected void
assertNoMessageForCstic(CsticModel cstic)
protected void
assertSingleMessage(ConfigModel config, ProductConfigMessageSeverity expectedSeverity, java.lang.String expectedMessage)
protected void
assertSingleMessageForCstic(CsticModel cstic, ProductConfigMessageSeverity expectedSeverity, java.lang.String expectedMessage)
protected ConfigModel
changeValueAndUpdate(ConfigModel config, java.lang.String cstic, java.lang.String value)
protected void
checkCompilerAndPublishResult(java.util.List<SourceRuleModel> sourceRules, RuleCompilerPublisherResult compileAndPublishRules)
void
enforeRuleAwareService()
protected java.lang.String
getLogString(java.util.Set<ProductConfigMessage> messages)
protected void
importCPQTestData()
void
initProviders()
protected java.util.Map<java.lang.String,java.lang.String>
prepareAndPublishRule(java.lang.String... ruleNames)
protected java.util.Set<BaseStoreModel>
prepareBaseStores(java.util.Properties testProps)
protected java.util.Date
prepareDate(java.lang.String dateAsString)
protected SourceRuleModel
prepareSourceRule(java.util.Map<java.lang.String,java.lang.String> nameToMessage, java.lang.String ruleName)
void
restoreDefaultProductConfigService()
void
setUp()
-
Methods inherited from class de.hybris.platform.sap.productconfig.services.integrationtests.CPQServiceLayerTest
clearProductConfigurationItems, createCoreData, ensureCPSProvider, ensureMockProvider, ensureNoRulesCPSWithDefaultLifecyclce, ensureSSCProvider, getFromPersistence, getLifecycleBeanName, importCPQUserData, importCsvIfExist, isDefaultLifecycle, isPersistentLifecycle, makeProductCatalogVersionAvailableInSession, prepareCPQData, selectStrategyTestChecker, tearDown, useCurrency_USD, useLocale_EN
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
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
-
-
-
-
Field Detail
-
ruleAwareService
protected ProductConfigurationServiceImpl ruleAwareService
-
ruleMaintenanceService
protected RuleMaintenanceService ruleMaintenanceService
-
raoPopulator
protected ProductConfigCartRAOPopulator raoPopulator
-
productService
protected ProductService productService
-
commerceCartService
protected CommerceCartService commerceCartService
-
expectedMessage
protected java.lang.String expectedMessage
-
EXPECTED_MESSAGE
protected static final java.lang.String EXPECTED_MESSAGE
- See Also:
- Constant Field Values
-
YM_NS_F160
protected static final java.lang.String YM_NS_F160
- See Also:
- Constant Field Values
-
CPQ_HT_SPK_COLOR
protected static final java.lang.String CPQ_HT_SPK_COLOR
- See Also:
- Constant Field Values
-
CPQ_HT_SPK_MODEL
protected static final java.lang.String CPQ_HT_SPK_MODEL
- See Also:
- Constant Field Values
-
EXP_NUMBER
protected static final java.lang.String EXP_NUMBER
- See Also:
- Constant Field Values
-
YSAP_POC_SIMPLE_FLAG
protected static final java.lang.String YSAP_POC_SIMPLE_FLAG
- See Also:
- Constant Field Values
-
STEREO
protected static final java.lang.String STEREO
- See Also:
- Constant Field Values
-
SURROUND
protected static final java.lang.String SURROUND
- See Also:
- Constant Field Values
-
CPQ_HT_SURROUND_MODE
protected static final java.lang.String CPQ_HT_SURROUND_MODE
- See Also:
- Constant Field Values
-
CPQ_SOFTWARE
protected static final java.lang.String CPQ_SOFTWARE
- See Also:
- Constant Field Values
-
PAINTER
protected static final java.lang.String PAINTER
- See Also:
- Constant Field Values
-
CPQ_SECURITY
protected static final java.lang.String CPQ_SECURITY
- See Also:
- Constant Field Values
-
NORTON
protected static final java.lang.String NORTON
- See Also:
- Constant Field Values
-
CPQ_DISPLAY
protected static final java.lang.String CPQ_DISPLAY
- See Also:
- Constant Field Values
-
CPQ_RAM
protected static final java.lang.String CPQ_RAM
- See Also:
- Constant Field Values
-
CPQ_DISPLAY_17
protected static final java.lang.String CPQ_DISPLAY_17
- See Also:
- Constant Field Values
-
CPQ_DISPLAY_13
protected static final java.lang.String CPQ_DISPLAY_13
- See Also:
- Constant Field Values
-
CPQ_DISPLAY_15
protected static final java.lang.String CPQ_DISPLAY_15
- See Also:
- Constant Field Values
-
CPQ_MONITOR
protected static final java.lang.String CPQ_MONITOR
- See Also:
- Constant Field Values
-
CPQ_MONITOR_21
protected static final java.lang.String CPQ_MONITOR_21
- See Also:
- Constant Field Values
-
CPQ_MONITOR_24
protected static final java.lang.String CPQ_MONITOR_24
- See Also:
- Constant Field Values
-
CPQ_MONITOR_24HD
protected static final java.lang.String CPQ_MONITOR_24HD
- See Also:
- Constant Field Values
-
CPQ_MONITOR_27
protected static final java.lang.String CPQ_MONITOR_27
- See Also:
- Constant Field Values
-
CPQ_CPU
protected static final java.lang.String CPQ_CPU
- See Also:
- Constant Field Values
-
INTELI7_40
protected static final java.lang.String INTELI7_40
- See Also:
- Constant Field Values
-
INTELI5_35
protected static final java.lang.String INTELI5_35
- See Also:
- Constant Field Values
-
CPQ_OS
protected static final java.lang.String CPQ_OS
- See Also:
- Constant Field Values
-
LINUSDEBIAN
protected static final java.lang.String LINUSDEBIAN
- See Also:
- Constant Field Values
-
MS10
protected static final java.lang.String MS10
- See Also:
- Constant Field Values
-
-
Method Detail
-
importCPQTestData
protected void importCPQTestData() throws ImpExException, java.lang.Exception
- Overrides:
importCPQTestData
in classCPQServiceLayerTest
- Throws:
ImpExException
java.lang.Exception
-
setUp
public void setUp() throws ImpExException, java.lang.Exception
- Throws:
ImpExException
java.lang.Exception
-
enforeRuleAwareService
public void enforeRuleAwareService()
-
initProviders
public void initProviders()
- Overrides:
initProviders
in classCPQServiceLayerTest
-
restoreDefaultProductConfigService
public void restoreDefaultProductConfigService()
-
assertSingleMessage
protected void assertSingleMessage(ConfigModel config, ProductConfigMessageSeverity expectedSeverity, java.lang.String expectedMessage)
-
assertSingleMessageForCstic
protected void assertSingleMessageForCstic(CsticModel cstic, ProductConfigMessageSeverity expectedSeverity, java.lang.String expectedMessage)
-
assertNoMessage
protected void assertNoMessage(ConfigModel config)
-
assertNoMessageForCstic
protected void assertNoMessageForCstic(CsticModel cstic)
-
getLogString
protected java.lang.String getLogString(java.util.Set<ProductConfigMessage> messages)
-
prepareAndPublishRule
protected java.util.Map<java.lang.String,java.lang.String> prepareAndPublishRule(java.lang.String... ruleNames) throws RuleEngineServiceException
- Throws:
RuleEngineServiceException
-
prepareSourceRule
protected SourceRuleModel prepareSourceRule(java.util.Map<java.lang.String,java.lang.String> nameToMessage, java.lang.String ruleName)
-
prepareDate
protected java.util.Date prepareDate(java.lang.String dateAsString)
-
checkCompilerAndPublishResult
protected void checkCompilerAndPublishResult(java.util.List<SourceRuleModel> sourceRules, RuleCompilerPublisherResult compileAndPublishRules)
-
prepareBaseStores
protected java.util.Set<BaseStoreModel> prepareBaseStores(java.util.Properties testProps)
-
changeValueAndUpdate
protected ConfigModel changeValueAndUpdate(ConfigModel config, java.lang.String cstic, java.lang.String value)
-
addConfigurationToCart
protected void addConfigurationToCart(ConfigModel configModel, KBKey kbKey) throws CommerceCartModificationException
-
-