Author: hardy.ferentschik
Date: 2009-08-31 09:53:12 -0400 (Mon, 31 Aug 2009)
New Revision: 17452
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/PrePosting.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ValidPackage.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/ClassLevelOverridingTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/Optional.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/Package.java
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingWithAnnotationTest.xml
Removed:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ClassLevelOverridingTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/PrePosting.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ValidPackage.java
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingWithAnnotationTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingImplicitOverrideTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingWithAnnotationTest.xml
Log:
Test package refactoring to further structure TCK tests
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ClassLevelOverridingTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ClassLevelOverridingTest.java 2009-08-31
13:14:55 UTC (rev 17451)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ClassLevelOverridingTest.java 2009-08-31
13:53:12 UTC (rev 17452)
@@ -1,61 +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.xmlconfiguration.constraintdeclaration;
-
-import java.util.Set;
-import javax.validation.ConstraintViolation;
-import javax.validation.Validator;
-
-import org.jboss.test.audit.annotations.SpecAssertion;
-import org.jboss.test.audit.annotations.SpecAssertions;
-import org.jboss.testharness.AbstractTest;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.ArtifactType;
-import org.jboss.testharness.impl.packaging.Classes;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.jsr303.ValidationXml;
-import org.testng.annotations.Test;
-
-import org.hibernate.jsr303.tck.util.TestUtil;
-import static
org.hibernate.jsr303.tck.util.TestUtil.assertCorrectConstraintViolationMessages;
-import static org.hibernate.jsr303.tck.util.TestUtil.assertCorrectNumberOfViolations;
-
-/**
- * @author Hardy Ferentschik
- */
-@Artifact(artifactType = ArtifactType.JSR303)
-@Classes({ TestUtil.class, TestUtil.PathImpl.class, TestUtil.NodeImpl.class })
-@ValidationXml(value = "validation-ClassLevelOverridingTest.xml")
-@Resource(source = "package-constraints-ClassLevelOverridingTest.xml",
- destination =
"WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingTest.xml")
-public class ClassLevelOverridingTest extends AbstractTest {
-
- @Test
- @SpecAssertions({
- @SpecAssertion(section = "7.1.1.1", id = "a"),
- @SpecAssertion(section = "7.1.1.1", id = "c")
- })
- public void testIgnoreClassLevelAnnotations() {
- Validator validator = TestUtil.getValidatorUnderTest();
- Package p = new Package();
- Set<ConstraintViolation<Package>> violations = validator.validate( p );
-
- assertCorrectNumberOfViolations( violations, 1 );
- assertCorrectConstraintViolationMessages( violations, "ValidPackage defined in
XML" );
- }
-}
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/PrePosting.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/PrePosting.java 2009-08-31
13:14:55 UTC (rev 17451)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/PrePosting.java 2009-08-31
13:53:12 UTC (rev 17452)
@@ -1,24 +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.xmlconfiguration.constraintdeclaration;
-
-/**
- * @author Hardy Ferentschik
- */
-public interface PrePosting {
-}
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/PrePosting.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/PrePosting.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/PrePosting.java 2009-08-31
13:53:12 UTC (rev 17452)
@@ -0,0 +1,24 @@
+// $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.xmlconfiguration.constraintdeclaration;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface PrePosting {
+}
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ValidPackage.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ValidPackage.java 2009-08-31
13:14:55 UTC (rev 17451)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ValidPackage.java 2009-08-31
13:53:12 UTC (rev 17452)
@@ -1,56 +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.xmlconfiguration.constraintdeclaration;
-
-import java.lang.annotation.Documented;
-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.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-
-/**
- * @author Hardy Ferentschik
- */
-@Constraint(validatedBy = ValidPackage.ValidPackageValidator.class)
-@Documented
-@Target({ METHOD, FIELD, TYPE })
-@Retention(RUNTIME)
-public @interface ValidPackage {
- public abstract String message() default "User information is not
consistent.";
-
- public abstract Class<?>[] groups() default { };
-
- public abstract Class<? extends Payload>[] payload() default { };
-
- public class ValidPackageValidator implements ConstraintValidator<ValidPackage,
Package> {
-
- public void initialize(ValidPackage parameters) {
- }
-
- public boolean isValid(Package p, ConstraintValidatorContext
constraintValidatorContext) {
- return false;
- }
- }
-}
\ No newline at end of file
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ValidPackage.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ValidPackage.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ValidPackage.java 2009-08-31
13:53:12 UTC (rev 17452)
@@ -0,0 +1,55 @@
+// $Id: ValidPackage.java 17427 2009-08-27 09:47:28Z hardy.ferentschik $
+/*
+* 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.xmlconfiguration.constraintdeclaration;
+
+import java.lang.annotation.Documented;
+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.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import javax.validation.Payload;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Constraint(validatedBy = ValidPackage.ValidPackageValidator.class)
+@Documented
+@Target({ METHOD, FIELD, TYPE })
+@Retention(RUNTIME)
+public @interface ValidPackage {
+ public abstract String message() default "User information is not
consistent.";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+
+ public class ValidPackageValidator implements ConstraintValidator<ValidPackage,
Package> {
+
+ public void initialize(ValidPackage parameters) {
+ }
+
+ public boolean isValid(Package p, ConstraintValidatorContext
constraintValidatorContext) {
+ return false;
+ }
+ }
+}
\ No newline at end of file
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/ClassLevelOverridingTest.java
(from rev 17449,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ClassLevelOverridingTest.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/ClassLevelOverridingTest.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/ClassLevelOverridingTest.java 2009-08-31
13:53:12 UTC (rev 17452)
@@ -0,0 +1,108 @@
+// $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.xmlconfiguration.constraintdeclaration.classlevel;
+
+import java.util.Set;
+import javax.validation.Configuration;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecAssertions;
+import org.jboss.testharness.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ArtifactType;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.Resources;
+import org.testng.annotations.Test;
+
+import org.hibernate.jsr303.tck.util.TestUtil;
+import static
org.hibernate.jsr303.tck.util.TestUtil.assertCorrectConstraintViolationMessages;
+import static org.hibernate.jsr303.tck.util.TestUtil.assertCorrectNumberOfViolations;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Artifact(artifactType = ArtifactType.JSR303)
+@Classes({ TestUtil.class, TestUtil.PathImpl.class, TestUtil.NodeImpl.class })
+@Resources({
+ @Resource(source = ClassLevelOverridingTest.mappingFile1,
+ destination = "WEB-INF/classes" + ClassLevelOverridingTest.packageName +
ClassLevelOverridingTest.mappingFile1),
+ @Resource(source = ClassLevelOverridingTest.mappingFile2,
+ destination = "WEB-INF/classes" + ClassLevelOverridingTest.packageName +
ClassLevelOverridingTest.mappingFile2),
+ @Resource(source = ClassLevelOverridingTest.mappingFile3,
+ destination = "WEB-INF/classes" + ClassLevelOverridingTest.packageName +
ClassLevelOverridingTest.mappingFile3)
+})
+public class ClassLevelOverridingTest extends AbstractTest {
+
+ public final static String packageName =
"/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/";
+ public final static String mappingFile1 =
"package-constraints-ClassLevelOverridingTest.xml";
+ public final static String mappingFile2 =
"package-constraints-ClassLevelOverridingImplicitOverrideTest.xml";
+ public final static String mappingFile3 =
"package-constraints-ClassLevelOverridingWithAnnotationTest.xml";
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "7.1.1.1", id = "a"),
+ @SpecAssertion(section = "7.1.1.1", id = "c")
+ })
+ public void testIgnoreClassLevelAnnotations() {
+ Configuration<?> config = TestUtil.getConfigurationUnderTest();
+ config.addMapping( TestUtil.getInputStreamForPath( packageName + mappingFile1 ) );
+ Validator validator = config.buildValidatorFactory().getValidator();
+
+ Package p = new Package();
+ Set<ConstraintViolation<Package>> violations = validator.validate( p );
+
+ assertCorrectNumberOfViolations( violations, 1 );
+ assertCorrectConstraintViolationMessages( violations, "ValidPackage defined in
XML" );
+ }
+
+ @Test
+ @SpecAssertion(section = "7.1.1.1", id = "b")
+ public void testIgnoreAnnotationsFromEnclosingBeanIsApplied() {
+ Configuration<?> config = TestUtil.getConfigurationUnderTest();
+ config.addMapping( TestUtil.getInputStreamForPath( packageName + mappingFile2 ) );
+ Validator validator = config.buildValidatorFactory().getValidator();
+
+ Package p = new Package();
+ Set<ConstraintViolation<Package>> violations = validator.validate( p );
+
+ assertCorrectNumberOfViolations( violations, 1 );
+ assertCorrectConstraintViolationMessages( violations, "ValidPackage defined in
XML" );
+ }
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "7.1.1.1", id = "a"),
+ @SpecAssertion(section = "7.1.1.1", id = "d")
+ })
+ public void testClassLevelAnnotationsApplied() {
+ Configuration<?> config = TestUtil.getConfigurationUnderTest();
+ config.addMapping( TestUtil.getInputStreamForPath( packageName + mappingFile3 ) );
+ Validator validator = config.buildValidatorFactory().getValidator();
+
+ Package p = new Package();
+ Set<ConstraintViolation<Package>> violations = validator.validate( p );
+
+ assertCorrectNumberOfViolations( violations, 2 );
+ assertCorrectConstraintViolationMessages(
+ violations, "ValidPackage defined in XML", "ValidPackage defined as
annotation"
+ );
+ }
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/ClassLevelOverridingTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/Optional.java
(from rev 17449,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/Optional.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/Optional.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/Optional.java 2009-08-31
13:53:12 UTC (rev 17452)
@@ -0,0 +1,24 @@
+// $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.xmlconfiguration.constraintdeclaration.classlevel;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface Optional {
+}
\ No newline at end of file
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/Package.java
(from rev 17449,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/Package.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/Package.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/Package.java 2009-08-31
13:53:12 UTC (rev 17452)
@@ -0,0 +1,39 @@
+// $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.xmlconfiguration.constraintdeclaration.classlevel;
+
+import javax.validation.GroupSequence;
+import javax.validation.constraints.Max;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@GroupSequence(value = { Package.class, PrePosting.class })
+@ValidPackage(message = "ValidPackage defined as annotation", groups =
PrePosting.class)
+public class Package {
+ @Max(value = 20, groups = Optional.class, message = "The package is too
heavy")
+ private int maxWeight;
+
+ public int getMaxWeight() {
+ return maxWeight;
+ }
+
+ public void setMaxWeight(int maxWeight) {
+ this.maxWeight = maxWeight;
+ }
+}
\ No newline at end of file
Copied:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml
(from rev 17449,
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml 2009-08-31
13:53:12 UTC (rev 17452)
@@ -0,0 +1,12 @@
+<constraint-mappings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping
validation-mapping-1.0.xsd"
+
xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
+
<default-package>org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.classlevel</default-package>
+ <bean class="Package" ignore-annotations="true">
+ <class>
+ <constraint
annotation="org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.classlevel.ValidPackage">
+ <message>ValidPackage defined in XML</message>
+ </constraint>
+ </class>
+ </bean>
+</constraint-mappings>
\ No newline at end of file
Copied:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingTest.xml
(from rev 17449,
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingTest.xml)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingTest.xml
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingTest.xml 2009-08-31
13:53:12 UTC (rev 17452)
@@ -0,0 +1,12 @@
+<constraint-mappings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping
validation-mapping-1.0.xsd"
+
xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
+
<default-package>org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.classlevel</default-package>
+ <bean class="Package">
+ <class ignore-annotations="true">
+ <constraint
annotation="org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.classlevel.ValidPackage">
+ <message>ValidPackage defined in XML</message>
+ </constraint>
+ </class>
+ </bean>
+</constraint-mappings>
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Copied:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingWithAnnotationTest.xml
(from rev 17449,
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingWithAnnotationTest.xml)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingWithAnnotationTest.xml
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/classlevel/package-constraints-ClassLevelOverridingWithAnnotationTest.xml 2009-08-31
13:53:12 UTC (rev 17452)
@@ -0,0 +1,16 @@
+<constraint-mappings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping
validation-mapping-1.0.xsd"
+
xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
+
<default-package>org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.classlevel</default-package>
+ <bean class="Package">
+ <class ignore-annotations="false">
+ <constraint
annotation="org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.classlevel.ValidPackage">
+ <message>ValidPackage defined in XML</message>
+ <groups>
+
<value>org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.classlevel.PrePosting
+ </value>
+ </groups>
+ </constraint>
+ </class>
+ </bean>
+</constraint-mappings>
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml 2009-08-31
13:14:55 UTC (rev 17451)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml 2009-08-31
13:53:12 UTC (rev 17452)
@@ -1,12 +0,0 @@
-<constraint-mappings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping
validation-mapping-1.0.xsd"
-
xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
-
<default-package>org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration</default-package>
- <bean class="Package" ignore-annotations="true">
- <class>
- <constraint
annotation="org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.ValidPackage">
- <message>ValidPackage defined in XML</message>
- </constraint>
- </class>
- </bean>
-</constraint-mappings>
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingTest.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingTest.xml 2009-08-31
13:14:55 UTC (rev 17451)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingTest.xml 2009-08-31
13:53:12 UTC (rev 17452)
@@ -1,12 +0,0 @@
-<constraint-mappings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping
validation-mapping-1.0.xsd"
-
xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
-
<default-package>org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration</default-package>
- <bean class="Package">
- <class ignore-annotations="true">
- <constraint
annotation="org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.ValidPackage">
- <message>ValidPackage defined in XML</message>
- </constraint>
- </class>
- </bean>
-</constraint-mappings>
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingWithAnnotationTest.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingWithAnnotationTest.xml 2009-08-31
13:14:55 UTC (rev 17451)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingWithAnnotationTest.xml 2009-08-31
13:53:12 UTC (rev 17452)
@@ -1,16 +0,0 @@
-<constraint-mappings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping
validation-mapping-1.0.xsd"
-
xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
-
<default-package>org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration</default-package>
- <bean class="Package">
- <class ignore-annotations="false">
- <constraint
annotation="org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.ValidPackage">
- <message>ValidPackage defined in XML</message>
- <groups>
-
<value>org.hibernate.jsr303.tck.tests.xmlconfiguration.constraintdeclaration.PrePosting
- </value>
- </groups>
- </constraint>
- </class>
- </bean>
-</constraint-mappings>
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingImplicitOverrideTest.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingImplicitOverrideTest.xml 2009-08-31
13:14:55 UTC (rev 17451)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingImplicitOverrideTest.xml 2009-08-31
13:53:12 UTC (rev 17452)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<validation-config
xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
-
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configu...
validation-configuration-1.0.xsd"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
<constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingImplicitOverrideTest.xml</constraint-mapping>
-</validation-config>
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingTest.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingTest.xml 2009-08-31
13:14:55 UTC (rev 17451)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingTest.xml 2009-08-31
13:53:12 UTC (rev 17452)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<validation-config
xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
-
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configu...
validation-configuration-1.0.xsd"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
<constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingTest.xml</constraint-mapping>
-</validation-config>
\ No newline at end of file
Deleted:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingWithAnnotationTest.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingWithAnnotationTest.xml 2009-08-31
13:14:55 UTC (rev 17451)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ClassLevelOverridingWithAnnotationTest.xml 2009-08-31
13:53:12 UTC (rev 17452)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<validation-config
xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
-
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configu...
validation-configuration-1.0.xsd"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
<constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ClassLevelOverridingWithAnnotationTest.xml</constraint-mapping>
-</validation-config>
\ No newline at end of file