Package org.apache.bval.jsr
Class ConstraintCompositionTest
- java.lang.Object
-
- org.apache.bval.jsr.ValidationTestBase
-
- org.apache.bval.jsr.ConstraintCompositionTest
-
public class ConstraintCompositionTest extends ValidationTestBase
Checks that groups are correctly inherited from the root constraint to its compositing constraints.- Author:
- Carlos Vara
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConstraintCompositionTest.Code
static interface
ConstraintCompositionTest.ElevenDigitsCode
static interface
ConstraintCompositionTest.Group1
static interface
ConstraintCompositionTest.Group2
static class
ConstraintCompositionTest.Man
static interface
ConstraintCompositionTest.ManName
static class
ConstraintCompositionTest.Payload1
static class
ConstraintCompositionTest.Payload2
static class
ConstraintCompositionTest.Person
static interface
ConstraintCompositionTest.PersonId
static interface
ConstraintCompositionTest.PersonName
-
Field Summary
-
Fields inherited from class org.apache.bval.jsr.ValidationTestBase
factory, validator
-
-
Constructor Summary
Constructors Constructor Description ConstraintCompositionTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
test1LevelInheritance()
Check correct group inheritance on constraint composition on a 1 level hierarchy.void
test2LevelInheritance()
Check correct group inheritance on constraint composition on a 2 level hierarchy.void
testAnnotationGroupsAreInherited()
Checks that the groups() value of the constraint annotations are correctly set to the inherited ones.void
testAnnotationPayloadsAreInherited()
Checks that the payload() value of the constraint annotations are correctly set to the inherited ones.void
testIndexedOverridesAttributes()
Checks thatOverridesAttribute.constraintIndex()
parsing and applying works.void
testReportAsAsingleViolation()
Checks that errors are reported correctly when usingReportAsSingleViolation
.-
Methods inherited from class org.apache.bval.jsr.ValidationTestBase
createValidator, setUp, setupValidatorFactory
-
-
-
-
Method Detail
-
test1LevelInheritance
public void test1LevelInheritance()
Check correct group inheritance on constraint composition on a 1 level hierarchy.
-
test2LevelInheritance
public void test2LevelInheritance()
Check correct group inheritance on constraint composition on a 2 level hierarchy.
-
testAnnotationGroupsAreInherited
public void testAnnotationGroupsAreInherited()
Checks that the groups() value of the constraint annotations are correctly set to the inherited ones.
-
testAnnotationPayloadsAreInherited
public void testAnnotationPayloadsAreInherited()
Checks that the payload() value of the constraint annotations are correctly set to the inherited ones.
-
testIndexedOverridesAttributes
public void testIndexedOverridesAttributes()
Checks thatOverridesAttribute.constraintIndex()
parsing and applying works.
-
testReportAsAsingleViolation
public void testReportAsAsingleViolation()
Checks that errors are reported correctly when usingReportAsSingleViolation
.
-
-