Class AbstractBundleValidationTest
- 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.validation.model.constraints.jsr303.AbstractConstraintTest
-
- de.hybris.platform.configurablebundleservices.constraints.AbstractBundleValidationTest
-
- All Implemented Interfaces:
JaloSessionHolder
- Direct Known Subclasses:
BundleTemplateProductValidationTest,BundleTemplateStructureValidationTest,DisableRuleValidationTest,PriceRuleValidationTest
public class AbstractBundleValidationTest extends AbstractConstraintTest
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.validation.model.constraints.jsr303.AbstractConstraintTest
AbstractConstraintTest.Constraint
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringFIELD_MESSAGEprotected static java.lang.StringFIELD_PROPERTYprotected static java.lang.StringFIELD_SEVERITY-
Fields inherited from class de.hybris.platform.validation.model.constraints.jsr303.AbstractConstraintTest
constraintDao, flexibleSearchService, i18nService, modelService, typeService
-
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 AbstractBundleValidationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BundleTemplateModelgetBundleTemplate(java.lang.String templateId)Get bundle template by ID.protected CatalogVersionModelgetCatalog()protected CatalogVersionServicegetCatalogVersionService()protected ConstraintGroupModelgetGroup(java.lang.String id)protected ValidationServicegetValidationService()protected voidimportString(java.lang.String impex)Import given string as ImpEx.voidsetup()protected java.util.Set<HybrisConstraintViolation>validate(java.lang.String bundleTemplateId, java.lang.String constraintGroupId)Validate bundle template against given validation group.-
Methods inherited from class de.hybris.platform.validation.model.constraints.jsr303.AbstractConstraintTest
assertModelSavingExceptionWithEvaluatedMessage, assertModelSavingExceptionWithEvaluatedMessage, assertModelSavingExceptionWithMessageKey, assertModelSavingExceptionWithMessageKey, assertTrimmedException, calculateFractionPrecision, checkException, checkException, checkException, getDefaultMessage, resetConstraints, unloadEngine
-
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
-
-
-
-
Field Detail
-
FIELD_MESSAGE
protected static final java.lang.String FIELD_MESSAGE
- See Also:
- Constant Field Values
-
FIELD_PROPERTY
protected static final java.lang.String FIELD_PROPERTY
- See Also:
- Constant Field Values
-
FIELD_SEVERITY
protected static final java.lang.String FIELD_SEVERITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
setup
public void setup() throws ImpExException- Throws:
ImpExException
-
validate
protected java.util.Set<HybrisConstraintViolation> validate(java.lang.String bundleTemplateId, java.lang.String constraintGroupId)
Validate bundle template against given validation group.- Parameters:
bundleTemplateId- bundle template idconstraintGroupId- id of validator group to use- Returns:
- collection of validation violations
-
getBundleTemplate
protected BundleTemplateModel getBundleTemplate(java.lang.String templateId)
Get bundle template by ID.- Parameters:
templateId- id- Returns:
- bundle template
-
getCatalog
protected CatalogVersionModel getCatalog()
-
getGroup
protected ConstraintGroupModel getGroup(java.lang.String id)
-
importString
protected void importString(java.lang.String impex) throws ImpExExceptionImport given string as ImpEx.- Parameters:
impex- impex script body- Throws:
ImpExException
-
getValidationService
protected ValidationService getValidationService()
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
-