Class AttributeConstraintTest
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.model.constraints.AttributeConstraintTest
- All Implemented Interfaces:
JaloSessionHolder
-
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 TypeMethodDescriptionvoidBeanTwoModel.value has one annotation and 2 additional hybris constraints are created.voidSame as testValidateAnnotationInPOJO_OneViolation() but here an additional hybris constraint is created BUT FOR A DIFFERENT POJO.voidTesting both class annotation for one attributevoidvoidvoidvoidvoidvoidvoidvoidvoidprovided annotation class is not an annotation - casevoidvoidvoidvoidvoidTesting annotation for BeanTwoModel.voidTesting annotation for BeanTwoModel.test.voidSame as testValidateAnnotationInPOJO_OneViolation() BUT here an additional hybris constraint is created TO THE SAME POJO (different attribute, this doesn't matter here).voidMethods 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
-
AttributeConstraintTest
public AttributeConstraintTest()
-
-
Method Details
-
testAttributeAssignmentForModelFillInFromDescriptor
public void testAttributeAssignmentForModelFillInFromDescriptor() -
testAttributeAssignmentEmptyDescriptor
public void testAttributeAssignmentEmptyDescriptor() -
testAttributeAssignmentNotCorrectAnnotationClass
public void testAttributeAssignmentNotCorrectAnnotationClass()provided annotation class is not an annotation - case -
testAttributeAssignmentForModel
public void testAttributeAssignmentForModel() -
testAttributeAssignmentIncompatibleQualifier
public void testAttributeAssignmentIncompatibleQualifier() -
testAttributeDescriptorOverridesType
public void testAttributeDescriptorOverridesType() -
testAttributeAssignmentIncompatibleDescriptorTargetClass
public void testAttributeAssignmentIncompatibleDescriptorTargetClass() -
testAttributeAssignmentIncompatibleTargetClassType
public void testAttributeAssignmentIncompatibleTargetClassType() -
testAttributeAssignmentInvalidModel
public void testAttributeAssignmentInvalidModel() -
testAttributeAssignmentForPojo
public void testAttributeAssignmentForPojo() -
testNullConstraintWithNonExistingDescriptor
public void testNullConstraintWithNonExistingDescriptor() -
testValidateAnnotationInPOJOok
public void testValidateAnnotationInPOJOok()Testing annotation for BeanTwoModel. This bean contains 3 annotations which are not violated here. Expect no violation. -
testValidateAnnotationInPOJOOneViolation
public void testValidateAnnotationInPOJOOneViolation()Testing annotation for BeanTwoModel.test. The given value is greater than the decimalmax rule value but the digit rule is ok. Only the decimalmax violation is expected and this should not change after reloading the framework. -
testAnnotationInPOJODifferentAttributes
public void testAnnotationInPOJODifferentAttributes()Same as testValidateAnnotationInPOJO_OneViolation() but here an additional hybris constraint is created BUT FOR A DIFFERENT POJO. The violation has to be the same as before. -
testValidateAnnotationInPOJOSameAttribute
public void testValidateAnnotationInPOJOSameAttribute()Same as testValidateAnnotationInPOJO_OneViolation() BUT here an additional hybris constraint is created TO THE SAME POJO (different attribute, this doesn't matter here). The new constraint won't be violated. Therefore the same violation (decimalmax) should be thrown. -
testNeedReloadAttributeTest
- Throws:
InterruptedException
-
testAnnotationInPOJOTwoViolation
public void testAnnotationInPOJOTwoViolation()Testing both class annotation for one attribute -
testAnnotationInPOJOandConstraints
public void testAnnotationInPOJOandConstraints()BeanTwoModel.value has one annotation and 2 additional hybris constraints are created. First only the annotation should report the violation, than the validation framework is reloaded and all THREE should report a violation! -
testHOR969
public void testHOR969() -
typeConstraintWithoutAnnotationShouldNotThrowNPE
public void typeConstraintWithoutAnnotationShouldNotThrowNPE()
-