@SpecAssertion(section = "8.1.1.4", id = "l"),
@SpecAssertion(section = "8.1.1.4", id = "m"),
@SpecAssertion(section = "8.1.1.4", id = "o")
})
public void testIgnoreAnnotationsOnConstructorLevel() {
ConstructorDescriptor descriptor = TestUtil.getConstructorDescriptor(
IgnoreAnnotations.class,
String.class,
String.class
);
CrossParameterDescriptor crossParameterDescriptor = descriptor.getCrossParameterDescriptor();
assertFalse( crossParameterDescriptor.hasConstraints(), "Cross parameter constraints should be ignored." );
ReturnValueDescriptor returnValueDescriptor = descriptor.getReturnValueDescriptor();
assertFalse( returnValueDescriptor.hasConstraints(), "Return value constraints should be ignored." );
assertTrue( returnValueDescriptor.getGroupConversions().isEmpty(), "Group conversions should be ignored" );
ParameterDescriptor parameterDescriptor = descriptor.getParameterDescriptors().get( 0 );
assertFalse( parameterDescriptor.hasConstraints(), "First parameter constraints should be ignored." );
assertTrue( parameterDescriptor.getGroupConversions().isEmpty(), "Group conversions should be ignored" );
parameterDescriptor = descriptor.getParameterDescriptors().get( 1 );
assertTrue( parameterDescriptor.hasConstraints(), "Second parameter constraints should be applied." );
assertEquals( parameterDescriptor.getGroupConversions().size(), 2, "All group conversions should be combined" );
}