Class GenericConstraintsValidationTest
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.services.integration.GenericConstraintsValidationTest
- All Implemented Interfaces:
JaloSessionHolder
Covers more advanced cases of constraint cases using service layer validation.
-
Nested Class Summary
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, 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 TypeMethodDescriptionvoidsetting the NotNull constraint to C2LItemModel.avtive and the AssertFalse to LanguageModel.active (same attribute descriptor)voidtesting the AssertTrue setting the constraint to the C2LItemModel.active attribute but for the LanguageModel onlyvoidchecking validation after detaching all - should not throw any validation exceptionvoidtesting the constraints DecimalMin, DecimalMax and Digitsvoidnull reference constraint test on different type level attributesvoidsimple test - using own model attribute Testing NotNull constraintvoidalso simple test - but using attribute from supermodel Testing Null constraintMethods 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
-
GenericConstraintsValidationTest
public GenericConstraintsValidationTest()
-
-
Method Details
-
testInhereitanceFieldForModel
public void testInhereitanceFieldForModel()null reference constraint test on different type level attributesPrincipal.NAME | User.PASSWORDPASSWORDQUESTION | Customer -
testNotNullConstraintWithOwnModelAttributes
public void testNotNullConstraintWithOwnModelAttributes()simple test - using own model attribute Testing NotNull constraint -
testNullConstraintWithSuperModelAttributes
public void testNullConstraintWithSuperModelAttributes()also simple test - but using attribute from supermodel Testing Null constraint -
testAssertTrue
public void testAssertTrue()testing the AssertTrue setting the constraint to the C2LItemModel.active attribute but for the LanguageModel only -
testAssertFalseAndNotNull
public void testAssertFalseAndNotNull()setting the NotNull constraint to C2LItemModel.avtive and the AssertFalse to LanguageModel.active (same attribute descriptor) -
testDecimalMinMaxAndDigitsConstraints
public void testDecimalMinMaxAndDigitsConstraints()testing the constraints DecimalMin, DecimalMax and Digits -
testDecimalMinMaxAndDigitsAfterDetachingConstraints
public void testDecimalMinMaxAndDigitsAfterDetachingConstraints()checking validation after detaching all - should not throw any validation exception
-