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
@IntegrationTest public class CustomMessageValidationTest extends AbstractConstraintTest
JUnit Tests for the Validation extension
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classCustomMessageValidationTest.PojoNonPrimitiveprotected classCustomMessageValidationTest.PojoPrimitive-
Nested 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, validationService
-
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 CustomMessageValidationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> voidcheckViolations(java.lang.String expectedMessage, java.util.Set<HybrisConstraintViolation> constraintViolations)protected <T> booleandoesMessageExist(java.lang.String expectedMessage, java.util.Set<HybrisConstraintViolation> constraintViolations)voidprepareConstraints()voidtestNonPrimitivePojo()voidtestPrimitivePojo()voidvalidateCategoryModel()voidvalidateProductModel()Tests both constraint forProductModelnot null for theProductModel.CODE,size constrain for aProductModel.NAME( warn name must be not null )voidvalidateUnitModel()Tests 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, 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
-
-
-
-
Method Detail
-
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(java.lang.String expectedMessage, java.util.Set<HybrisConstraintViolation> constraintViolations)
-
doesMessageExist
protected <T> boolean doesMessageExist(java.lang.String expectedMessage, java.util.Set<HybrisConstraintViolation> constraintViolations)
-
-