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 CommerceCartServicecommerceCartServiceprotected static java.lang.StringCPQ_CPUprotected static java.lang.StringCPQ_DISPLAYprotected static java.lang.StringCPQ_DISPLAY_13protected static java.lang.StringCPQ_DISPLAY_15protected static java.lang.StringCPQ_DISPLAY_17protected static java.lang.StringCPQ_HT_SPK_COLORprotected static java.lang.StringCPQ_HT_SPK_MODELprotected static java.lang.StringCPQ_HT_SURROUND_MODEprotected static java.lang.StringCPQ_MONITORprotected static java.lang.StringCPQ_MONITOR_21protected static java.lang.StringCPQ_MONITOR_24protected static java.lang.StringCPQ_MONITOR_24HDprotected static java.lang.StringCPQ_MONITOR_27protected static java.lang.StringCPQ_OSprotected static java.lang.StringCPQ_RAMprotected static java.lang.StringCPQ_SECURITYprotected static java.lang.StringCPQ_SOFTWAREprotected static java.lang.StringEXP_NUMBERprotected static java.lang.StringEXPECTED_MESSAGEprotected java.lang.StringexpectedMessageprotected static java.lang.StringINTELI5_35protected static java.lang.StringINTELI7_40protected static java.lang.StringLINUSDEBIANprotected static java.lang.StringMS10protected static java.lang.StringNORTONprotected static java.lang.StringPAINTERprotected ProductServiceproductServiceprotected ProductConfigCartRAOPopulatorraoPopulatorprotected ProductConfigurationServiceImplruleAwareServiceprotected RuleMaintenanceServiceruleMaintenanceServiceprotected static java.lang.StringSTEREOprotected static java.lang.StringSURROUNDprotected static java.lang.StringYM_NS_F160protected static java.lang.StringYSAP_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 voidaddConfigurationToCart(ConfigModel configModel, KBKey kbKey)protected voidassertNoMessage(ConfigModel config)protected voidassertNoMessageForCstic(CsticModel cstic)protected voidassertSingleMessage(ConfigModel config, ProductConfigMessageSeverity expectedSeverity, java.lang.String expectedMessage)protected voidassertSingleMessageForCstic(CsticModel cstic, ProductConfigMessageSeverity expectedSeverity, java.lang.String expectedMessage)protected ConfigModelchangeValueAndUpdate(ConfigModel config, java.lang.String cstic, java.lang.String value)protected voidcheckCompilerAndPublishResult(java.util.List<SourceRuleModel> sourceRules, RuleCompilerPublisherResult compileAndPublishRules)voidenforeRuleAwareService()protected java.lang.StringgetLogString(java.util.Set<ProductConfigMessage> messages)protected voidimportCPQTestData()voidinitProviders()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.DateprepareDate(java.lang.String dateAsString)protected SourceRuleModelprepareSourceRule(java.util.Map<java.lang.String,java.lang.String> nameToMessage, java.lang.String ruleName)voidrestoreDefaultProductConfigService()voidsetUp()-
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:
importCPQTestDatain classCPQServiceLayerTest- Throws:
ImpExExceptionjava.lang.Exception
-
setUp
public void setUp() throws ImpExException, java.lang.Exception- Throws:
ImpExExceptionjava.lang.Exception
-
enforeRuleAwareService
public void enforeRuleAwareService()
-
initProviders
public void initProviders()
- Overrides:
initProvidersin 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
-
-