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
@IntegrationTest public class AttributeConstraintTest extends AbstractConstraintTest
-
-
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 AttributeConstraintTest()
-
Method Summary
-
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
-
testAttributeAssignmentForModelFillInFromDescriptor
public void testAttributeAssignmentForModelFillInFromDescriptor() throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
testAttributeAssignmentEmptyDescriptor
public void testAttributeAssignmentEmptyDescriptor()
-
testAttributeAssignmentNotCorrectAnnotationClass
public void testAttributeAssignmentNotCorrectAnnotationClass()
provided annotation class is not an annotation - case
-
testAttributeAssignmentForModel
public void testAttributeAssignmentForModel() throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
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
public void testNeedReloadAttributeTest() throws java.lang.InterruptedException
- Throws:
java.lang.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()
-
-