Author: hardy.ferentschik
Date: 2009-06-23 06:36:55 -0400 (Tue, 23 Jun 2009)
New Revision: 16899
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
Log:
Mapping some tests
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-06-23
10:32:46 UTC (rev 16898)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-06-23
10:36:55 UTC (rev 16899)
@@ -68,8 +68,19 @@
}
+ @SpecAssertion(section = "4.1.1", id = "b")
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testValidateWithNull() {
+ Validator validator = TestUtil.getDefaultValidator();
+ validator.validate( null );
+ }
+
@Test
- @SpecAssertion(section = "4.1.1", id = "c")
+ @SpecAssertions({
+ @SpecAssertion(section = "4.1.1", id = "a"),
+ @SpecAssertion(section = "4.1.1", id = "c")
+ })
+
public void testMultipleViolationOfTheSameType() {
Validator validator = TestUtil.getDefaultValidator();
@@ -135,7 +146,7 @@
violation.getConstraintDescriptor().getAnnotation().annotationType(),
Pattern.class, "Wrong annotation type"
);
- assertCorrectPropertyPaths(constraintViolations, "serialNumber");
+ assertCorrectPropertyPaths( constraintViolations, "serialNumber" );
engine.setSerialNumber( "ABCD-EFGH-1234" );
constraintViolations = validator.validate( engine );
@@ -161,7 +172,7 @@
assertEquals( constraintViolations.size(), 1, "Wrong number of constraints"
);
assertEquals( constraintViolation.getRootBean(), customer, "Wrong root
entity" );
assertEquals( constraintViolation.getInvalidValue(), order.getOrderNumber(),
"Wrong value" );
- assertCorrectPropertyPaths(constraintViolations, "orders[].orderNumber");
+ assertCorrectPropertyPaths( constraintViolations, "orders[].orderNumber" );
}
@Test
@@ -187,7 +198,7 @@
assertEquals( "Everyone has a last name.", constraintViolation.getMessage(),
"Wrong message" );
org.testng.Assert.assertEquals( constraintViolation.getRootBean(), clint, "Wrong
root entity" );
org.testng.Assert.assertEquals( constraintViolation.getInvalidValue(),
morgan.getLastName(), "Wrong value" );
- assertCorrectPropertyPaths(constraintViolations,
"playedWith[0].playedWith[1].lastName");
+ assertCorrectPropertyPaths( constraintViolations,
"playedWith[0].playedWith[1].lastName" );
}
@Test
@@ -223,12 +234,6 @@
TestUtil.getDefaultValidator().getConstraintsForClass( null );
}
- @Test(expectedExceptions = IllegalArgumentException.class)
- public void testValidateWithNull() {
- Validator validator = TestUtil.getDefaultValidator();
- validator.validate( null );
- }
-
@Test
@SuppressWarnings("NullArgumentToVariableArgMethod")
public void testPassingNullAsGroup() {
Modified: beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml 2009-06-23
10:32:46 UTC (rev 16898)
+++ beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml 2009-06-23
10:36:55 UTC (rev 16899)
@@ -394,7 +394,7 @@
</assertion>
</section>
<section id="3.5" title="Validation routine">
- <assertion id="a">
+ <assertion id="a" testable="false">
<text>For a given group to validate, the validation routine applied on
a given bean
instance is expected to execute the constraint validations in no
particular
order</text>