Author: hardy.ferentschik
Date: 2009-09-11 13:05:54 -0400 (Fri, 11 Sep 2009)
New Revision: 17510
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint1.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint2.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint3.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint4.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedCompositeConstraint.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintSingleViolation.java
Removed:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint1.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint2.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint3.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint4.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraint.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraintSingleViolation.java
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintCompositionTest.java
Log:
HV-225 mapped the tests for NestedConstraintCompositionTest
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint1.java
(from rev 17502,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint1.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint1.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint1.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -0,0 +1,43 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.constraints.Pattern;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+@Constraint(validatedBy = { })
+@Pattern(regexp = "abc", message = "Pattern must match {regexp}")
+@NestedConstraintSingleViolation
+public @interface CompositeConstraint1 {
+ public abstract String message() default "CompositeConstraint1 failed.";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+}
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint1.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint2.java
(from rev 17502,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint2.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint2.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint2.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -0,0 +1,45 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import javax.validation.constraints.Pattern;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Pattern(regexp = "abc")
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+@Constraint(validatedBy = { })
+@NestedConstraintSingleViolation
+@ReportAsSingleViolation
+public @interface CompositeConstraint2 {
+ public abstract String message() default "CompositeConstraint2 failed.";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint2.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint3.java
(from rev 17502,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint3.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint3.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint3.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -0,0 +1,43 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import javax.validation.constraints.Pattern;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Pattern(regexp = "abc", message = "Pattern must match {regexp}")
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+@Constraint(validatedBy = { })
+@NestedCompositeConstraint
+public @interface CompositeConstraint3 {
+ public abstract String message() default "CompositeConstraint3 failed.";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint3.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint4.java
(from rev 17502,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint4.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint4.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint4.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -0,0 +1,45 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import javax.validation.constraints.Pattern;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Pattern(regexp = "abc")
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+@Constraint(validatedBy = { })
+@NestedCompositeConstraint
+@ReportAsSingleViolation
+public @interface CompositeConstraint4 {
+ public abstract String message() default "CompositeConstraint4 failed.";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/CompositeConstraint4.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint1.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint1.java 2009-09-11
16:21:07 UTC (rev 17509)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint1.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -1,43 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.constraints.Pattern;
-
-/**
- * @author Hardy Ferentschik
- */
-@Target({ METHOD, FIELD })
-@Retention(RUNTIME)
-@Constraint(validatedBy = { })
-@Pattern(regexp = "abc", message = "Pattern must match {regexp}")
-@SecondCompositeConstraintSingleViolation
-public @interface FirstCompositeConstraint1 {
- public abstract String message() default "FirstCompositeConstraint1 failed.";
-
- public abstract Class<?>[] groups() default { };
-
- public abstract Class<? extends Payload>[] payload() default { };
-}
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint2.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint2.java 2009-09-11
16:21:07 UTC (rev 17509)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint2.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -1,45 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import javax.validation.constraints.Pattern;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-
-/**
- * @author Hardy Ferentschik
- */
-@Pattern(regexp = "abc")
-@Target({ METHOD, FIELD })
-@Retention(RUNTIME)
-@Constraint(validatedBy = { })
-@SecondCompositeConstraintSingleViolation
-@ReportAsSingleViolation
-public @interface FirstCompositeConstraint2 {
- public abstract String message() default "FirstCompositeConstraint2 failed.";
-
- public abstract Class<?>[] groups() default { };
-
- public abstract Class<? extends Payload>[] payload() default { };
-}
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint3.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint3.java 2009-09-11
16:21:07 UTC (rev 17509)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint3.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -1,43 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import javax.validation.constraints.Pattern;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-
-/**
- * @author Hardy Ferentschik
- */
-@Pattern(regexp = "abc", message = "Pattern must match {regexp}")
-@Target({ METHOD, FIELD })
-@Retention(RUNTIME)
-@Constraint(validatedBy = { })
-@SecondCompositeConstraint
-public @interface FirstCompositeConstraint3 {
- public abstract String message() default "FirstCompositeConstraint3 failed.";
-
- public abstract Class<?>[] groups() default { };
-
- public abstract Class<? extends Payload>[] payload() default { };
-}
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint4.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint4.java 2009-09-11
16:21:07 UTC (rev 17509)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/FirstCompositeConstraint4.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -1,45 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import javax.validation.constraints.Pattern;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-
-/**
- * @author Hardy Ferentschik
- */
-@Pattern(regexp = "abc")
-@Target({ METHOD, FIELD })
-@Retention(RUNTIME)
-@Constraint(validatedBy = { })
-@SecondCompositeConstraint
-@ReportAsSingleViolation
-public @interface FirstCompositeConstraint4 {
- public abstract String message() default "FirstCompositeConstraint4 failed.";
-
- public abstract Class<?>[] groups() default { };
-
- public abstract Class<? extends Payload>[] payload() default { };
-}
\ No newline at end of file
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedCompositeConstraint.java
(from rev 17502,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraint.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedCompositeConstraint.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedCompositeConstraint.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -0,0 +1,45 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Pattern(regexp = "...", message = "Pattern must match {regexp}")
+@Size(min = 3, max = 3, message = "Size must be {min}")
+@Target({ METHOD, FIELD, TYPE })
+@Retention(RUNTIME)
+@Constraint(validatedBy = { })
+public @interface NestedCompositeConstraint {
+ public abstract String message() default "NestedCompositeConstraint failed.";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedCompositeConstraint.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintCompositionTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintCompositionTest.java 2009-09-11
16:21:07 UTC (rev 17509)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintCompositionTest.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -23,6 +23,7 @@
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
+import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.testharness.AbstractTest;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ArtifactType;
@@ -35,7 +36,7 @@
import static org.hibernate.jsr303.tck.util.TestUtil.assertCorrectNumberOfViolations;
/**
- * Tests for composing constraints.
+ * Tests for error creation for nested composed constraints with different variations of
@REeportAsSingleViolation.
*
* @author Hardy Ferentschik
*/
@@ -44,31 +45,34 @@
public class NestedConstraintCompositionTest extends AbstractTest {
@Test
- public void testFirstConstraintAllViolationsSecondConstraintSingleViolation() {
+ @SpecAssertion(section = "2.3", id = "g")
+ public void testCompositeConstraint1WithNestedConstraintSingleViolation() {
Validator validator = TestUtil.getValidatorUnderTest();
DummyEntity1 dummy = new DummyEntity1( "" );
Set<ConstraintViolation<DummyEntity1>> constraintViolations =
validator.validate( dummy );
assertCorrectNumberOfViolations( constraintViolations, 2 );
assertCorrectConstraintTypes(
- constraintViolations, Pattern.class, SecondCompositeConstraintSingleViolation.class
+ constraintViolations, Pattern.class, NestedConstraintSingleViolation.class
);
assertCorrectConstraintViolationMessages(
- constraintViolations, "Pattern must match abc",
"SecondCompositeConstraintSingleViolation failed."
+ constraintViolations, "Pattern must match abc",
"NestedConstraintSingleViolation failed."
);
}
@Test
- public void testFirstConstraintSingleViolationSecondConstraintSingleViolation() {
+ @SpecAssertion(section = "2.3", id = "g")
+ public void testCompositeConstraint2WithNestedConstraintSingleViolation() {
Validator validator = TestUtil.getValidatorUnderTest();
DummyEntity2 dummy = new DummyEntity2( "" );
Set<ConstraintViolation<DummyEntity2>> constraintViolations =
validator.validate( dummy );
assertCorrectNumberOfViolations( constraintViolations, 1 );
- assertCorrectConstraintTypes( constraintViolations, FirstCompositeConstraint2.class );
- assertCorrectConstraintViolationMessages( constraintViolations,
"FirstCompositeConstraint2 failed." );
+ assertCorrectConstraintTypes( constraintViolations, CompositeConstraint2.class );
+ assertCorrectConstraintViolationMessages( constraintViolations,
"CompositeConstraint2 failed." );
}
@Test
- public void testFirstConstraintAllViolationSecondConstraintAllViolations() {
+ @SpecAssertion(section = "2.3", id = "g")
+ public void testCompositeConstraint3WithNestedConstraint() {
Validator validator = TestUtil.getValidatorUnderTest();
DummyEntity3 dummy = new DummyEntity3( "" );
Set<ConstraintViolation<DummyEntity3>> constraintViolations =
validator.validate( dummy );
@@ -80,18 +84,18 @@
}
@Test
- public void testFirstConstraintSingleViolationSecondConstraintAllViolations() {
+ @SpecAssertion(section = "2.3", id = "g")
+ public void testCompositeConstraint4WithNestedConstraintSingleViolation() {
Validator validator = TestUtil.getValidatorUnderTest();
DummyEntity4 dummy = new DummyEntity4( "" );
Set<ConstraintViolation<DummyEntity4>> constraintViolations =
validator.validate( dummy );
assertCorrectNumberOfViolations( constraintViolations, 1 );
- assertCorrectConstraintTypes( constraintViolations, FirstCompositeConstraint4.class );
- assertCorrectConstraintViolationMessages( constraintViolations,
"FirstCompositeConstraint4 failed." );
+ assertCorrectConstraintTypes( constraintViolations, CompositeConstraint4.class );
+ assertCorrectConstraintViolationMessages( constraintViolations,
"CompositeConstraint4 failed." );
}
-
class DummyEntity1 {
- @FirstCompositeConstraint1
+ @CompositeConstraint1
String string;
DummyEntity1(String s) {
@@ -100,7 +104,7 @@
}
class DummyEntity2 {
- @FirstCompositeConstraint2
+ @CompositeConstraint2
String string;
DummyEntity2(String s) {
@@ -109,7 +113,7 @@
}
class DummyEntity3 {
- @FirstCompositeConstraint3
+ @CompositeConstraint3
String string;
DummyEntity3(String s) {
@@ -118,7 +122,7 @@
}
class DummyEntity4 {
- @FirstCompositeConstraint4
+ @CompositeConstraint4
String string;
DummyEntity4(String s) {
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintSingleViolation.java
(from rev 17502,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraintSingleViolation.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintSingleViolation.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintSingleViolation.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -0,0 +1,47 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import javax.validation.ReportAsSingleViolation;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Pattern(regexp = "...", message = "Pattern must match {regexp}")
+@Size(min = 3, max = 3, message = "Size must be {min}")
+@Target({ METHOD, FIELD, TYPE })
+@Retention(RUNTIME)
+@Constraint(validatedBy = { })
+@ReportAsSingleViolation
+public @interface NestedConstraintSingleViolation {
+ public abstract String message() default "NestedConstraintSingleViolation
failed.";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintSingleViolation.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraint.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraint.java 2009-09-11
16:21:07 UTC (rev 17509)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraint.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -1,45 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
- */
-@Pattern(regexp = "...", message = "Pattern must match {regexp}")
-@Size(min = 3, max = 3, message = "Size must be {min}")
-@Target({ METHOD, FIELD, TYPE })
-@Retention(RUNTIME)
-@Constraint(validatedBy = { })
-public @interface SecondCompositeConstraint {
- public abstract String message() default "SecondCompositeConstraintSingleViolation
failed.";
-
- public abstract Class<?>[] groups() default { };
-
- public abstract Class<? extends Payload>[] payload() default { };
-}
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraintSingleViolation.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraintSingleViolation.java 2009-09-11
16:21:07 UTC (rev 17509)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/SecondCompositeConstraintSingleViolation.java 2009-09-11
17:05:54 UTC (rev 17510)
@@ -1,47 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package
org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import javax.validation.ReportAsSingleViolation;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
- */
-@Pattern(regexp = "...", message = "Pattern must match {regexp}")
-@Size(min = 3, max = 3, message = "Size must be {min}")
-@Target({ METHOD, FIELD, TYPE })
-@Retention(RUNTIME)
-@Constraint(validatedBy = { })
-@ReportAsSingleViolation
-public @interface SecondCompositeConstraintSingleViolation {
- public abstract String message() default "SecondCompositeConstraintSingleViolation
failed.";
-
- public abstract Class<?>[] groups() default { };
-
- public abstract Class<? extends Payload>[] payload() default { };
-}
\ No newline at end of file