Class CustomMessageValidationTest
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.validation.messages.CustomMessageValidationTest
- All Implemented Interfaces:
JaloSessionHolder
JUnit Tests for the Validation extension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classNested classes/interfaces inherited from class de.hybris.platform.validation.model.constraints.jsr303.AbstractConstraintTest
AbstractConstraintTest.Constraint -
Field Summary
Fields inherited from class de.hybris.platform.validation.model.constraints.jsr303.AbstractConstraintTest
constraintDao, flexibleSearchService, i18nService, modelService, typeService, validationServiceFields 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 <T> voidcheckViolations(String expectedMessage, Set<HybrisConstraintViolation> constraintViolations) protected <T> booleandoesMessageExist(String expectedMessage, Set<HybrisConstraintViolation> constraintViolations) voidvoidvoidvoidvoidTests both constraint forProductModelnot null for theProductModel.CODE,size constrain for aProductModel.NAME( warn name must be not null )voidTests both constraint forUnitModelnot null for theUnitModel.CODE,size constrain for aUnitModel.NAME( warn name must be not null )Methods inherited from class de.hybris.platform.validation.model.constraints.jsr303.AbstractConstraintTest
assertModelSavingExceptionWithEvaluatedMessage, assertModelSavingExceptionWithEvaluatedMessage, assertModelSavingExceptionWithMessageKey, assertModelSavingExceptionWithMessageKey, assertTrimmedException, calculateFractionPrecision, checkException, checkException, checkException, getDefaultMessage, resetConstraints, unloadEngineMethods 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
-
Constructor Details
-
CustomMessageValidationTest
public CustomMessageValidationTest()
-
-
Method Details
-
prepareConstraints
public void prepareConstraints() -
validateProductModel
public void validateProductModel()Tests both constraint forProductModelnot null for theProductModel.CODE,size constrain for aProductModel.NAME( warn name must be not null ) -
validateUnitModel
public void validateUnitModel()Tests both constraint forUnitModelnot null for theUnitModel.CODE,size constrain for aUnitModel.NAME( warn name must be not null ) -
validateCategoryModel
public void validateCategoryModel() -
testNonPrimitivePojo
public void testNonPrimitivePojo() -
testPrimitivePojo
public void testPrimitivePojo() -
checkViolations
protected <T> void checkViolations(String expectedMessage, Set<HybrisConstraintViolation> constraintViolations) -
doesMessageExist
protected <T> boolean doesMessageExist(String expectedMessage, Set<HybrisConstraintViolation> constraintViolations)
-