[hibernate-commits] Hibernate SVN: r16617 - beanvalidation/trunk/validation-tck/src/main/resources.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Mon May 25 09:48:07 EDT 2009


Author: hardy.ferentschik
Date: 2009-05-25 09:48:07 -0400 (Mon, 25 May 2009)
New Revision: 16617

Modified:
   beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
Log:
more assertions

Modified: beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml	2009-05-25 13:47:53 UTC (rev 16616)
+++ beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml	2009-05-25 13:48:07 UTC (rev 16617)
@@ -356,8 +356,7 @@
         </assertion>
     </section>
 
-
-    <section id="3.4.2" title="">
+    <section id="3.4.2" title="Group sequence ">
         <assertion id="a">
             <text>By default, constraints are evaluated in no particular order and this regardless
                 of which groups they belong to</text>
@@ -401,7 +400,7 @@
                 group(s)</text>
         </assertion>
     </section>
-    <section id="3.4.3" title="">
+    <section id="3.4.3" title="Redefining the Default group for a class">
         <assertion id="a">
             <text>To redefine Default for a class, place a @GroupSequence annotation on the class ;
                 this sequence expresses the sequence of groups that does substitute Default for this
@@ -421,13 +420,13 @@
                 when its metadata is requested</text>
         </assertion>
     </section>
-    <section id="3.4.4" title="">
+    <section id="3.4.4" title="Implicit grouping">
         <assertion id="a">
             <text>Every constraint hosted on an interface Z and part of the Default group
                 (implicitly or expli- citly) belongs to the group Z</text>
         </assertion>
     </section>
-    <section id="3.5" title="">
+    <section id="3.5" title="Validation routine">
         <assertion id="a">
             <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
@@ -442,7 +441,7 @@
                 order</text>
         </assertion>
     </section>
-    <section id="3.5.1" title="">
+    <section id="3.5.1" title="Object graph validation ">
         <assertion id="a">
             <text>The @Valid annotation on a given association (i.e. object reference or collection,
                 array, Iterable of objects), dic- tates the Bean Validator implementation to apply
@@ -460,7 +459,7 @@
                 the current navigation path (starting from the root object)</text>
         </assertion>
     </section>
-    <section id="3.5.2" title="">
+    <section id="3.5.2" title="Traversable property">
         <assertion id="a">
             <text>isCascadable for a given property is only called if isReachable returns true. In
                 other words, isReachable is always called before isCascadable for a given
@@ -487,7 +486,7 @@
             <text>all properties are considered cascadable</text>
         </assertion>
     </section>
-    <section id="3.5.3" title="">
+    <section id="3.5.3" title="ConstraintValidator resolution algorithm">
         <assertion id="a">
             <text>A constraint is associated to one or more ConstraintValidator
                 implementations</text>
@@ -527,8 +526,111 @@
                 UnexpectedTypeException is raised</text>
         </assertion>
     </section>
+    <section id="4.1" title="Validator API ">
+        <assertion id="a">
+            <text>Validator implementations are thread-safe</text>
+        </assertion>
+    </section>
+    <section id="4.1.1" title="Validation methods">
+        <assertion id="a">
+            <text>validate(T object, Class... groups) is used to validate a given ob- ject</text>
+        </assertion>
+        <assertion id="b">
+            <text>A Set containing all ConstraintViolation ob- jects representing the failing
+                constraints is returned, an empty Set is returned otherwise</text>
+        </assertion>
+        <assertion id="c">
+            <text>validateProperty(T object, String propertyName, Class... groups) validates a given
+                field or property of an object</text>
+        </assertion>
+        <assertion id="d">
+            <text>The property name is the JavaBeans property name (as defined by the JavaBeans
+                Introspector class)</text>
+        </assertion>
+        <assertion id="e">
+            <text>@Valid is not honored by this method</text>
+        </assertion>
+        <assertion id="f">
+            <text>validateValue(Class beanType, String propertyName, Object value, Class... groups)
+                validates the property referenced by propertyName present on beanType or any of its
+                superclasses, if the property value were value.</text>
+        </assertion>
+        <assertion id="g">
+            <text>@Valid is not honored by this method</text>
+        </assertion>
+        <assertion id="h">
+            <text>If some unrecoverable failure happens during validation, a ValidationException is
+                raised.</text>
+        </assertion>
+    </section>
+    <section id="4.1.2" title="groups">
+        <assertion id="a">
+            <text>All constraints belonging to the targeted group are applied during the Section
+                3.5</text>
+        </assertion>
+        <assertion id="b">
+            <text>If no group is passed, the Default group is assumed</text>
+        </assertion>
+        <assertion id="c">
+            <text>When more than one group is evaluated and passed to the various validate methods,
+                order is not constrained</text>
+        </assertion>
+        <assertion id="d">
+            <text>If the group definition is invalid, a GroupDefinitionException is raised</text>
+        </assertion>
+    </section>
+    <section id="4.2" title="ConstraintViolation">
+        <assertion id="a">
+            <text>The getMessage method returns the interpolated (localized) message for the failing
+                constraint</text>
+        </assertion>
+        <assertion id="b">
+            <text>The getMessageTemplate method returns the non-interpolated error message</text>
+        </assertion>
+        <assertion id="c">
+            <text>The getRootBean method returns the root object being validated that led to the
+                failing constraint</text>
+        </assertion>
+        <assertion id="d">
+            <text>The getInvalidValue method returns the value (field, property or validated object)
+                being passed to isValid</text>
+        </assertion>
+        <assertion id="e">
+            <text>getConstraintDescriptor provides access to the failing constraint metadata</text>
+        </assertion>
+        <assertion id="f">
+            <text>if the association is not hosted by the root object (ie hosted on an associated
+                object) a dot (.) is concaten- ated to the propertyPath</text>
+        </assertion>
+        <assertion id="g">
+            <text>the name of the association property (field name or Java Bean property name) is
+                concatenated to the prop- ertyPath.</text>
+        </assertion>
+        <assertion id="h">
+            <text>if the association is a List or an array, the index value surrounded by square
+                brackets ([index]) is concat- enated to the propertyPath (for example
+                order.orderLines[1])</text>
+        </assertion>
+        <assertion id="i">
+            <text>if the association is a Map, for a given map entry, the result of key.toString()
+                surrounded by square brack- ets and quotes (["key.toString()"]) is concatenated to
+                the propertyPath (for example item.evaluation["quality"])</text>
+        </assertion>
+        <assertion id="j">
+            <text>if the property level constraint is not hosted by the root object (ie hosted on an
+                associated object) a dot (.) is concatenated to the propertyPath</text>
+        </assertion>
+        <assertion id="k">
+            <text>the name of the property (field name or Java Bean property name) is concatenated
+                to the propertyPath</text>
+        </assertion>
+        <assertion id="l">
+            <text>nothing is concatenated to the propertyPath, it is considered complete. If the
+                propertyPath is empty, "" is returned (typically a class-level constraint on the
+                root object)</text>
+        </assertion>
+    </section>
 
-
     <!--    
     <assertion id="">
     <text></text>




More information about the hibernate-commits mailing list