@Test
@SpecAssertion(section = "8.1.1", id = "d")
public void testConstraintAnnotationsArePerDefaultIgnoredForXmlConfiguredEntities() {
Validator validator = TestUtil.getValidatorUnderTest();
BeanDescriptor beanDescriptor = validator.getConstraintsForClass( Package.class );
assertFalse( beanDescriptor.isBeanConstrained(), "With xml configuration there should be no constraint." );
Configuration<?> config = TestUtil.getConfigurationUnderTest();
config.ignoreXmlConfiguration();
validator = config.buildValidatorFactory().getValidator();
beanDescriptor = validator.getConstraintsForClass( Package.class );
assertTrue(
beanDescriptor.isBeanConstrained(),
"If xml configuration is ignored Package should have a single constraint."
);
}