Author: hardy.ferentschik
Date: 2009-08-27 06:40:19 -0400 (Thu, 27 Aug 2009)
New Revision: 17428
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/ConstraintCompositionTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Name.java
beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
Log:
Mapped the payload propagation test.
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/ConstraintCompositionTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/ConstraintCompositionTest.java 2009-08-27
09:47:28 UTC (rev 17427)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/ConstraintCompositionTest.java 2009-08-27
10:40:19 UTC (rev 17428)
@@ -264,6 +264,7 @@
}
@Test
+ @SpecAssertion(section = "2.3", id = "p")
public void testPayloadPropagationInComposedConstraints() {
Friend john = new Friend( "John", "Doe" );
@@ -281,7 +282,6 @@
assertTrue( payload.getName().equals( Severity.Warn.class.getName() ), "Unexpected
payload" );
}
-
private FrenchAddress getFrenchAddressWithoutZipCode() {
FrenchAddress address = new FrenchAddress();
address.setAddressline1( "10 rue des Treuils" );
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Name.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Name.java 2009-08-27
09:47:28 UTC (rev 17427)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Name.java 2009-08-27
10:40:19 UTC (rev 17428)
@@ -33,7 +33,7 @@
* @author Hardy Ferentschik
*/
@Documented
-@NotNull
+@NotNull(payload = Severity.Error.class)
@Size
@Constraint(validatedBy = { })
@Target({ TYPE, METHOD, FIELD })
Modified: beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml 2009-08-27
09:47:28 UTC (rev 17427)
+++ beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml 2009-08-27
10:40:19 UTC (rev 17428)
@@ -58,7 +58,7 @@
<text>The default value for the payload parameter must be an empty
array. </text>
</assertion>
<assertion id="j">
- <text>Each attachable payload extends ConstraintPayload. </text>
+ <text>Each attachable payload extends Payload. </text>
</assertion>
</section>
@@ -135,6 +135,9 @@
ConstraintDefinitionException is raised either at validation time or when
the
metadata is requested</text>
</assertion>
+ <assertion id="p">
+ <text>Any payload definition on a composing annotation is
ignored</text>
+ </assertion>
</section>
<section id="2.4" title="Constraint validation
implementation">
<assertion id="a">