protected Validator createValidator() {
return factory.getValidator();
}
public void testMetaDataAPI_ComposedConstraints() {
ElementDescriptor ed =
validator.getConstraintsForClass(FrenchAddress.class)
.getConstraintsForProperty("zipCode");
Assert.assertEquals(1, ed.getConstraintDescriptors().size());
for (ConstraintDescriptor<?> cd : ed.getConstraintDescriptors()) {
Assert.assertTrue(cd.isReportAsSingleViolation());
Assert.assertEquals(3, cd.getComposingConstraints().size());
Assert.assertTrue("no composing constraints found!!",
!cd.getComposingConstraints().isEmpty());
processConstraintDescriptor(cd); //check all constraints on zip code