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
@IntegrationTest public class GenericConstraintsValidationTest extends AbstractConstraintTest
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, 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 GenericConstraintsValidationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestAssertFalseAndNotNull()setting the NotNull constraint to C2LItemModel.avtive and the AssertFalse to LanguageModel.active (same attribute descriptor)voidtestAssertTrue()testing the AssertTrue setting the constraint to the C2LItemModel.active attribute but for the LanguageModel onlyvoidtestDecimalMinMaxAndDigitsAfterDetachingConstraints()checking validation after detaching all - should not throw any validation exceptionvoidtestDecimalMinMaxAndDigitsConstraints()testing the constraints DecimalMin, DecimalMax and DigitsvoidtestInhereitanceFieldForModel()null reference constraint test on different type level attributesvoidtestNotNullConstraintWithOwnModelAttributes()simple test - using own model attribute Testing NotNull constraintvoidtestNullConstraintWithSuperModelAttributes()also simple test - but using attribute from supermodel Testing Null constraint-
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
-
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
-
-