methodName,
String.class,
Item.class,
byte.class
);
Object returnValue = new Order( "" );
Set<ConstraintViolation<Object>> violations = executableValidator.validateReturnValue(
object,
method,
returnValue
);
//Only the constraints of the Basic group on OrderServiceWithRedefinedDefaultGroupSequence and of
//the Default group on Order should fail
assertCorrectConstraintTypes( violations, Size.class, ValidOrder.class );
assertCorrectPathNodeNames(
violations,
names( methodName, TestUtil.RETURN_VALUE_NODE_NAME ),
names( methodName, TestUtil.RETURN_VALUE_NODE_NAME, "name" )
);
assertCorrectPathNodeKinds(
violations,
kinds( ElementKind.METHOD, ElementKind.RETURN_VALUE ),
kinds( ElementKind.METHOD, ElementKind.RETURN_VALUE, ElementKind.PROPERTY )
);
returnValue = new Order( "valid" );
violations = executableValidator.validateReturnValue(
object,
method,
returnValue