Hibernate SVN: r17385 - core/trunk.
by hibernate-commits@lists.jboss.org
Author: galder.zamarreno(a)jboss.com
Date: 2009-08-21 04:34:12 -0400 (Fri, 21 Aug 2009)
New Revision: 17385
Added:
core/trunk/cache-infinispan/
Log:
[HHH-4103] Initial cache provider implementation.
15 years, 3 months
Hibernate SVN: r17384 - beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-21 04:07:45 -0400 (Fri, 21 Aug 2009)
New Revision: 17384
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.java
Removed:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Foo.java
Log:
trying to fix a character case problem
Deleted: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Foo.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Foo.java 2009-08-21 08:06:21 UTC (rev 17383)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Foo.java 2009-08-21 08:07:45 UTC (rev 17384)
@@ -1,66 +0,0 @@
-// $Id: InvalidXmlConfigurationTest.java 17352 2009-08-18 17:08:59Z 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;
-
-
-import javax.validation.ValidationException;
-
-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.jsr303.ValidationXml;
-import static org.testng.Assert.fail;
-import org.testng.annotations.Test;
-
-import org.hibernate.jsr303.tck.common.TCKValidationProvider;
-import org.hibernate.jsr303.tck.common.TCKValidatorConfiguration;
-import org.hibernate.jsr303.tck.util.TestUtil;
-
-/**
- * @author Hardy Ferentschik
- */
-@Artifact(artifactType = ArtifactType.JSR303)
-@Classes({
- TestUtil.class,
- TestUtil.PathImpl.class,
- TestUtil.NodeImpl.class,
- TCKValidationProvider.class,
- TCKValidatorConfiguration.class,
- TCKValidationProvider.DummyValidatorFactory.class
-})
-@ValidationXml(value = "validation-TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.xml")
-public class TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest extends AbstractTest {
-
- @Test
- @SpecAssertions({
- @SpecAssertion(section = "4.4.6", id = "h"),
- @SpecAssertion(section = "4.4.6", id = "q")
- })
- public void testTraversableResolverSpecifiedInValidationXmlHasNoDefaultConstructor() {
- try {
- TestUtil.getValidatorUnderTest();
- fail( "Bootstrapping should have failed due to missing no-arg constructor in TraversableResolver" );
- }
- catch ( ValidationException e ) {
- // success
- }
- }
-}
\ No newline at end of file
Copied: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.java (from rev 17383, beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Foo.java)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.java 2009-08-21 08:07:45 UTC (rev 17384)
@@ -0,0 +1,66 @@
+// $Id: InvalidXmlConfigurationTest.java 17352 2009-08-18 17:08:59Z 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;
+
+
+import javax.validation.ValidationException;
+
+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.jsr303.ValidationXml;
+import static org.testng.Assert.fail;
+import org.testng.annotations.Test;
+
+import org.hibernate.jsr303.tck.common.TCKValidationProvider;
+import org.hibernate.jsr303.tck.common.TCKValidatorConfiguration;
+import org.hibernate.jsr303.tck.util.TestUtil;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Artifact(artifactType = ArtifactType.JSR303)
+@Classes({
+ TestUtil.class,
+ TestUtil.PathImpl.class,
+ TestUtil.NodeImpl.class,
+ TCKValidationProvider.class,
+ TCKValidatorConfiguration.class,
+ TCKValidationProvider.DummyValidatorFactory.class
+})
+@ValidationXml(value = "validation-TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.xml")
+public class TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest extends AbstractTest {
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "4.4.6", id = "h"),
+ @SpecAssertion(section = "4.4.6", id = "q")
+ })
+ public void testTraversableResolverSpecifiedInValidationXmlHasNoDefaultConstructor() {
+ try {
+ TestUtil.getValidatorUnderTest();
+ fail( "Bootstrapping should have failed due to missing no-arg constructor in TraversableResolver" );
+ }
+ catch ( ValidationException e ) {
+ // success
+ }
+ }
+}
\ No newline at end of file
15 years, 3 months
Hibernate SVN: r17383 - beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-21 04:06:21 -0400 (Fri, 21 Aug 2009)
New Revision: 17383
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Foo.java
Removed:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TRaversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.java
Log:
trying to fix a character case problem
Copied: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Foo.java (from rev 17378, beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TRaversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.java)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Foo.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Foo.java 2009-08-21 08:06:21 UTC (rev 17383)
@@ -0,0 +1,66 @@
+// $Id: InvalidXmlConfigurationTest.java 17352 2009-08-18 17:08:59Z 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;
+
+
+import javax.validation.ValidationException;
+
+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.jsr303.ValidationXml;
+import static org.testng.Assert.fail;
+import org.testng.annotations.Test;
+
+import org.hibernate.jsr303.tck.common.TCKValidationProvider;
+import org.hibernate.jsr303.tck.common.TCKValidatorConfiguration;
+import org.hibernate.jsr303.tck.util.TestUtil;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Artifact(artifactType = ArtifactType.JSR303)
+@Classes({
+ TestUtil.class,
+ TestUtil.PathImpl.class,
+ TestUtil.NodeImpl.class,
+ TCKValidationProvider.class,
+ TCKValidatorConfiguration.class,
+ TCKValidationProvider.DummyValidatorFactory.class
+})
+@ValidationXml(value = "validation-TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.xml")
+public class TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest extends AbstractTest {
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "4.4.6", id = "h"),
+ @SpecAssertion(section = "4.4.6", id = "q")
+ })
+ public void testTraversableResolverSpecifiedInValidationXmlHasNoDefaultConstructor() {
+ try {
+ TestUtil.getValidatorUnderTest();
+ fail( "Bootstrapping should have failed due to missing no-arg constructor in TraversableResolver" );
+ }
+ catch ( ValidationException e ) {
+ // success
+ }
+ }
+}
\ No newline at end of file
Deleted: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TRaversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TRaversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.java 2009-08-21 06:57:04 UTC (rev 17382)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TRaversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.java 2009-08-21 08:06:21 UTC (rev 17383)
@@ -1,66 +0,0 @@
-// $Id: InvalidXmlConfigurationTest.java 17352 2009-08-18 17:08:59Z 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;
-
-
-import javax.validation.ValidationException;
-
-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.jsr303.ValidationXml;
-import static org.testng.Assert.fail;
-import org.testng.annotations.Test;
-
-import org.hibernate.jsr303.tck.common.TCKValidationProvider;
-import org.hibernate.jsr303.tck.common.TCKValidatorConfiguration;
-import org.hibernate.jsr303.tck.util.TestUtil;
-
-/**
- * @author Hardy Ferentschik
- */
-@Artifact(artifactType = ArtifactType.JSR303)
-@Classes({
- TestUtil.class,
- TestUtil.PathImpl.class,
- TestUtil.NodeImpl.class,
- TCKValidationProvider.class,
- TCKValidatorConfiguration.class,
- TCKValidationProvider.DummyValidatorFactory.class
-})
-@ValidationXml(value = "validation-TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.xml")
-public class TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest extends AbstractTest {
-
- @Test
- @SpecAssertions({
- @SpecAssertion(section = "4.4.6", id = "h"),
- @SpecAssertion(section = "4.4.6", id = "q")
- })
- public void testTraversableResolverSpecifiedInValidationXmlHasNoDefaultConstructor() {
- try {
- TestUtil.getValidatorUnderTest();
- fail( "Bootstrapping should have failed due to missing no-arg constructor in TraversableResolver" );
- }
- catch ( ValidationException e ) {
- // success
- }
- }
-}
\ No newline at end of file
15 years, 3 months
Hibernate SVN: r17382 - in core/trunk/documentation: envers/src/main/docbook/en-US/content and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2009-08-21 02:57:04 -0400 (Fri, 21 Aug 2009)
New Revision: 17382
Modified:
core/trunk/documentation/envers/src/main/docbook/en-US/content/configuration.xml
core/trunk/documentation/pom.xml
Log:
HHH-4100: fixing the colum number in Envers docbook, uncommenting the Envers docbook module build
Modified: core/trunk/documentation/envers/src/main/docbook/en-US/content/configuration.xml
===================================================================
--- core/trunk/documentation/envers/src/main/docbook/en-US/content/configuration.xml 2009-08-20 17:09:33 UTC (rev 17381)
+++ core/trunk/documentation/envers/src/main/docbook/en-US/content/configuration.xml 2009-08-21 06:57:04 UTC (rev 17382)
@@ -46,7 +46,7 @@
<table frame="topbot">
<title>Envers Configuration Properties</title>
- <tgroup cols="2">
+ <tgroup cols="3">
<colspec colname="c1" colwidth="1*"/>
<colspec colname="c2" colwidth="1*"/>
<colspec colname="c2" colwidth="1*"/>
Modified: core/trunk/documentation/pom.xml
===================================================================
--- core/trunk/documentation/pom.xml 2009-08-20 17:09:33 UTC (rev 17381)
+++ core/trunk/documentation/pom.xml 2009-08-21 06:57:04 UTC (rev 17382)
@@ -18,8 +18,8 @@
<modules>
<module>manual</module>
+ <module>envers</module>
<!--
- <module>envers</module>
<module>jbosscache2</module>
-->
</modules>
15 years, 3 months
Hibernate SVN: r17381 - in beanvalidation/trunk/validation-tck/src/main: resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-20 13:09:33 -0400 (Thu, 20 Aug 2009)
New Revision: 17381
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConfigurationViaXmlAndAnnotationsTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConfiguredBeanNotInClassPathTest.java
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-ConfiguredBeanNotInClassPathTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConfigurationViaXmlAndAnnotationsTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConfigurationViaXmlAndAnnotationsTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConfiguredBeanNotInClassPathTest.xml
Log:
xml mapping tests
Copied: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConfigurationViaXmlAndAnnotationsTest.java (from rev 17380, beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConstraintDeclarationTest.java)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConfigurationViaXmlAndAnnotationsTest.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConfigurationViaXmlAndAnnotationsTest.java 2009-08-20 17:09:33 UTC (rev 17381)
@@ -0,0 +1,73 @@
+// $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 javax.validation.Configuration;
+import javax.validation.Validator;
+import javax.validation.metadata.BeanDescriptor;
+
+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;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.jsr303.ValidationXml;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.Test;
+
+import org.hibernate.jsr303.tck.util.TestUtil;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Artifact(artifactType = ArtifactType.JSR303)
+@Classes({ TestUtil.class, TestUtil.PathImpl.class, TestUtil.NodeImpl.class })
+@ValidationXml(value = "validation-ConfigurationViaXmlAndAnnotationsTest.xml")
+@Resource(source = "package-constraints-ConfigurationViaXmlAndAnnotationsTest.xml",
+ destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConfigurationViaXmlAndAnnotationsTest.xml")
+public class ConfigurationViaXmlAndAnnotationsTest extends AbstractTest {
+
+ @Test
+ @SpecAssertion(section = "7.1.1", id = "e")
+ public void testEntityConfiguredViaAnnotationsAndXml() {
+ Validator validator = TestUtil.getValidatorUnderTest();
+ BeanDescriptor beanDescriptor = validator.getConstraintsForClass( Package.class );
+ assertTrue( beanDescriptor.isBeanConstrained(), "With xml configuration there should be two constraints." );
+ assertEquals(
+ beanDescriptor.getConstraintsForProperty( "maxWeight" ).getConstraintDescriptors().size(),
+ 2,
+ "With xml configuration there should be two constraints."
+ );
+
+ Configuration<?> config = TestUtil.getConfigurationUnderTest();
+ config.ignoreXmlConfiguration();
+ validator = config.buildValidatorFactory().getValidator();
+ beanDescriptor = validator.getConstraintsForClass( Package.class );
+ assertTrue(
+ beanDescriptor.isBeanConstrained(),
+ "Without xml there should be only one constraint."
+ );
+ assertEquals(
+ beanDescriptor.getConstraintsForProperty( "maxWeight" ).getConstraintDescriptors().size(),
+ 1,
+ "Without xml there should be only one constraint."
+ );
+ }
+}
\ No newline at end of file
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConfigurationViaXmlAndAnnotationsTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConfiguredBeanNotInClassPathTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConfiguredBeanNotInClassPathTest.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConfiguredBeanNotInClassPathTest.java 2009-08-20 17:09:33 UTC (rev 17381)
@@ -0,0 +1,55 @@
+// $Id: ConstraintDeclarationTest.java 17380 2009-08-20 16:14:04Z 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 javax.validation.ValidationException;
+
+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;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.jsr303.ValidationXml;
+import static org.testng.Assert.fail;
+import org.testng.annotations.Test;
+
+import org.hibernate.jsr303.tck.util.TestUtil;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Artifact(artifactType = ArtifactType.JSR303)
+@Classes({ TestUtil.class, TestUtil.PathImpl.class, TestUtil.NodeImpl.class })
+@ValidationXml(value = "validation-ConfiguredBeanNotInClassPathTest.xml")
+@Resource(source = "constraints-ConfiguredBeanNotInClassPathTest.xml",
+ destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-ConfiguredBeanNotInClassPathTest.xml")
+public class ConfiguredBeanNotInClassPathTest extends AbstractTest {
+
+ @Test
+ @SpecAssertion(section = "7.1.1", id = "f")
+ public void testExceptionIsThrownForUnknownBeanNameInXml() {
+ try {
+ TestUtil.getValidatorUnderTest();
+ fail( "Test should have thrown an exception due to wrong class name" );
+ }
+ catch ( ValidationException e ) {
+ //success
+ }
+ }
+}
\ No newline at end of file
Added: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-ConfiguredBeanNotInClassPathTest.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-ConfiguredBeanNotInClassPathTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-ConfiguredBeanNotInClassPathTest.xml 2009-08-20 17:09:33 UTC (rev 17381)
@@ -0,0 +1,7 @@
+<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="Foo" ignore-annotations="false">
+ </bean>
+</constraint-mappings>
\ No newline at end of file
Copied: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConfigurationViaXmlAndAnnotationsTest.xml (from rev 17380, beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConstraintDeclarationTest.xml)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConfigurationViaXmlAndAnnotationsTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConfigurationViaXmlAndAnnotationsTest.xml 2009-08-20 17:09:33 UTC (rev 17381)
@@ -0,0 +1,10 @@
+<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="false">
+ <field name="maxWeight">
+ <constraint annotation="javax.validation.constraints.NotNull"/>
+ </field>
+ </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/package-constraints-ConfigurationViaXmlAndAnnotationsTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConfigurationViaXmlAndAnnotationsTest.xml (from rev 17380, beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConstraintDeclarationTest.xml)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConfigurationViaXmlAndAnnotationsTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConfigurationViaXmlAndAnnotationsTest.xml 2009-08-20 17:09:33 UTC (rev 17381)
@@ -0,0 +1,6 @@
+<?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/configuration 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-ConfigurationViaXmlAndAnnotationsTest.xml</constraint-mapping>
+</validation-config>
\ No newline at end of file
Added: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConfiguredBeanNotInClassPathTest.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConfiguredBeanNotInClassPathTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConfiguredBeanNotInClassPathTest.xml 2009-08-20 17:09:33 UTC (rev 17381)
@@ -0,0 +1,6 @@
+<?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/configuration validation-configuration-1.0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-ConfiguredBeanNotInClassPathTest.xml</constraint-mapping>
+</validation-config>
\ No newline at end of file
15 years, 3 months
Hibernate SVN: r17380 - in beanvalidation/trunk/validation-tck: src/main/assembly and 7 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-20 12:14:04 -0400 (Thu, 20 Aug 2009)
New Revision: 17380
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConstraintDeclarationTest.java
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/User.java
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-GroupIsNotAllowedAsElementNameTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MandatoryNameAttributeTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MessageIsNotAllowedAsElementNameTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConstraintDeclarationTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConstraintDeclarationTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-GroupIsNotAllowedAsElementNameTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MandatoryNameAttributeTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MessageIsNotAllowedAsElementNameTest.xml
Removed:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-group-element.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-message-element.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-no-name.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-invalid-element-name-group.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-invalid-element-name-message.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-mandatory-name-attribute.xml
Modified:
beanvalidation/trunk/validation-tck/pom.xml
beanvalidation/trunk/validation-tck/src/main/assembly/assembly.xml
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ConfigurationTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ValidationProviderResolverTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedConstraintValidatorFactoryResolver.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedMessageInterpolator.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedTraversableResolver.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConstraintValidatorFactorySpecifiedInValidationXmlTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlNoDefaultConstructorTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TraversableResolverSpecifiedInValidationXmlTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedConstraintValidatorFactory.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedMessageInterpolator.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedTraversableResolver.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/GroupIsNotAllowedAsElementNameTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MandatoryNameAttributeTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MessageIsNotAllowedAsElementNameTest.java
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/bootstrap/customprovider/validation-BootstrapUnknownCustomProviderTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints-MultipleGetterDefinitionTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-ConstraintValidatorFactorySpecifiedInValidationXmlTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-MessageInterpolatorSpecifiedInValidationXmlNoDefaultConstructorTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-MessageInterpolatorSpecifiedInValidationXmlTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-MultipleFieldDefinitionTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-MultipleGetterDefinitionTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-TraversableResolverSpecifiedInValidationXmlTest.xml
beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
beanvalidation/trunk/validation-tck/src/main/resources/tck-tests.xml
Log:
xml mapping tests
Property changes on: beanvalidation/trunk/validation-tck/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/assembly/assembly.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ConfigurationTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ConfigurationTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ConfigurationTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id: ValidationProviderResolverTest.java 17333 2009-08-17 13:43:03Z hardy.ferentschik $
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ConfigurationTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ValidationProviderResolverTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ValidationProviderResolverTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ValidationProviderResolverTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id: BootstrapTest.java 17334 2009-08-17 14:28:29Z hardy.ferentschik $
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/ValidationProviderResolverTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedConstraintValidatorFactoryResolver.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedConstraintValidatorFactoryResolver.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedConstraintValidatorFactoryResolver.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedConstraintValidatorFactoryResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedMessageInterpolator.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedMessageInterpolator.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedMessageInterpolator.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedMessageInterpolator.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedTraversableResolver.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedTraversableResolver.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedTraversableResolver.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConfigurationDefinedTraversableResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConstraintValidatorFactorySpecifiedInValidationXmlTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConstraintValidatorFactorySpecifiedInValidationXmlTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConstraintValidatorFactorySpecifiedInValidationXmlTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id: InvalidXmlConfigurationTest.java 17352 2009-08-18 17:08:59Z hardy.ferentschik $
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConstraintValidatorFactorySpecifiedInValidationXmlTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlNoDefaultConstructorTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlNoDefaultConstructorTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlNoDefaultConstructorTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id: InvalidXmlConfigurationTest.java 17352 2009-08-18 17:08:59Z hardy.ferentschik $
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlNoDefaultConstructorTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id: InvalidXmlConfigurationTest.java 17352 2009-08-18 17:08:59Z hardy.ferentschik $
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/MessageInterpolatorSpecifiedInValidationXmlTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TraversableResolverSpecifiedInValidationXmlTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TraversableResolverSpecifiedInValidationXmlTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TraversableResolverSpecifiedInValidationXmlTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id: InvalidXmlConfigurationTest.java 17352 2009-08-18 17:08:59Z hardy.ferentschik $
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TraversableResolverSpecifiedInValidationXmlTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -56,7 +56,7 @@
destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints.xml"),
@Resource(source = "order-constraints.xml",
destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints.xml"),
- @Resource(source = "order-constraints.xml",
+ @Resource(source = "order-constraints-XmlConfigurationTest.xml",
destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints-XmlConfigurationTest.xml")
}
)
@@ -236,7 +236,7 @@
@Test
@SpecAssertion(section = "4.4.6", id = "m")
- public void testMappingFilesAddedViaConfigurationGetAddedToXMlConfiguredMappings() {
+ public void testMappingFilesAddedViaConfigurationGetAddedToXmlConfiguredMappings() {
Validator validator = TestUtil.getValidatorUnderTest();
assertFalse(
@@ -260,7 +260,6 @@
}
private InputStream getStream(String fileName) {
- InputStream in = this.getClass().getResourceAsStream( fileName );
- return in;
+ return this.getClass().getResourceAsStream( fileName );
}
}
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedConstraintValidatorFactory.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedConstraintValidatorFactory.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedConstraintValidatorFactory.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedConstraintValidatorFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedMessageInterpolator.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedMessageInterpolator.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedMessageInterpolator.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedMessageInterpolator.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedTraversableResolver.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedTraversableResolver.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedTraversableResolver.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlDefinedTraversableResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConstraintDeclarationTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConstraintDeclarationTest.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConstraintDeclarationTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,63 @@
+// $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 javax.validation.Configuration;
+import javax.validation.Validator;
+import javax.validation.metadata.BeanDescriptor;
+
+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;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.jsr303.ValidationXml;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.Test;
+
+import org.hibernate.jsr303.tck.util.TestUtil;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Artifact(artifactType = ArtifactType.JSR303)
+@Classes({ TestUtil.class, TestUtil.PathImpl.class, TestUtil.NodeImpl.class })
+@ValidationXml(value = "validation-ConstraintDeclarationTest.xml")
+@Resource(source = "package-constraints-ConstraintDeclarationTest.xml",
+ destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConstraintDeclarationTest.xml")
+public class ConstraintDeclarationTest extends AbstractTest {
+
+ @Test
+ @SpecAssertion(section = "7.1.1", id = "d")
+ public void testConstraintAnnotationsArePerDefaultIgnoredForXmlConfiguredEntities() {
+ Validator validator = TestUtil.getValidatorUnderTest();
+ BeanDescriptor beanDescriptor = validator.getConstraintsForClass( Package.class );
+ assertFalse( beanDescriptor.isBeanConstrained(), "With xml configuration there should be no constraint." );
+
+ Configuration<?> config = TestUtil.getConfigurationUnderTest();
+ config.ignoreXmlConfiguration();
+ validator = config.buildValidatorFactory().getValidator();
+ beanDescriptor = validator.getConstraintsForClass( Package.class );
+ assertTrue(
+ beanDescriptor.isBeanConstrained(),
+ "If xml configuration is ignored Package should have a single constraint."
+ );
+ }
+}
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/ConstraintDeclarationTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/GroupIsNotAllowedAsElementNameTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/GroupIsNotAllowedAsElementNameTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/GroupIsNotAllowedAsElementNameTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -31,15 +31,16 @@
import org.testng.annotations.Test;
import org.hibernate.jsr303.tck.util.TestUtil;
+import org.hibernate.jsr303.tck.tests.constraints.groups.User;
/**
* @author Hardy Ferentschik
*/
@Artifact(artifactType = ArtifactType.JSR303)
@Classes({ TestUtil.class, TestUtil.PathImpl.class, TestUtil.NodeImpl.class })
-@ValidationXml(value = "validation-invalid-element-name-group.xml")
-@Resource(source = "constraints-with-group-element.xml",
- destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-group-element")
+@ValidationXml(value = "validation-GroupIsNotAllowedAsElementNameTest.xml")
+@Resource(source = "constraints-GroupIsNotAllowedAsElementNameTest.xml",
+ destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-GroupIsNotAllowedAsElementNameTest.xml")
public class GroupIsNotAllowedAsElementNameTest extends AbstractTest {
@Test
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MandatoryNameAttributeTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MandatoryNameAttributeTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MandatoryNameAttributeTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -37,9 +37,9 @@
*/
@Artifact(artifactType = ArtifactType.JSR303)
@Classes({ TestUtil.class, TestUtil.PathImpl.class, TestUtil.NodeImpl.class })
-@ValidationXml(value = "validation-mandatory-name-attribute.xml")
-@Resource(source = "constraints-with-no-name.xml",
- destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-no-name.xml")
+@ValidationXml(value = "validation-MandatoryNameAttributeTest.xml")
+@Resource(source = "constraints-MandatoryNameAttributeTest.xml",
+ destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MandatoryNameAttributeTest.xml")
public class MandatoryNameAttributeTest extends AbstractTest {
@Test
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MessageIsNotAllowedAsElementNameTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MessageIsNotAllowedAsElementNameTest.java 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MessageIsNotAllowedAsElementNameTest.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -37,9 +37,9 @@
*/
@Artifact(artifactType = ArtifactType.JSR303)
@Classes({ TestUtil.class, TestUtil.PathImpl.class, TestUtil.NodeImpl.class })
-@ValidationXml(value = "validation-invalid-element-name-message.xml")
-@Resource(source = "constraints-with-message-element.xml",
- destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-message-element")
+@ValidationXml(value = "validation-MessageIsNotAllowedAsElementNameTest.xml")
+@Resource(source = "constraints-MessageIsNotAllowedAsElementNameTest.xml",
+ destination = "WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MessageIsNotAllowedAsElementNameTest.xml")
public class MessageIsNotAllowedAsElementNameTest extends AbstractTest {
@Test
Added: 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/Package.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/Package.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,36 @@
+// $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 javax.validation.constraints.Max;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Package {
+ @Max(20)
+ private int maxWeight;
+
+ public int getMaxWeight() {
+ return maxWeight;
+ }
+
+ public void setMaxWeight(int maxWeight) {
+ this.maxWeight = maxWeight;
+ }
+}
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/Package.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/User.java (from rev 17345, beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/User.java)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/User.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/User.java 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,48 @@
+// $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 javax.validation.constraints.NotNull;
+import javax.validation.groups.Default;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class User {
+
+ private String firstname;
+
+ private String lastname;
+
+ @NotNull(groups = Default.class)
+ public String getFirstname() {
+ return firstname;
+ }
+
+ public void setFirstname(String firstname) {
+ this.firstname = firstname;
+ }
+
+ public String getLastname() {
+ return lastname;
+ }
+
+ public void setLastname(String lastname) {
+ this.lastname = lastname;
+ }
+}
\ No newline at end of file
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/bootstrap/customprovider/validation-BootstrapUnknownCustomProviderTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-GroupIsNotAllowedAsElementNameTest.xml (from rev 17345, beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-group-element.xml)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-GroupIsNotAllowedAsElementNameTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-GroupIsNotAllowedAsElementNameTest.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -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</default-package>
+ <bean class="User" ignore-annotations="true">
+ <field name="lastname">
+ <constraint annotation="javax.validation.constraints.Pattern">
+ <message>Last name has to start with with a capital letter.</message>
+ <element name="regexp">^[A-Z][a-z]+</element>
+ <element name="groups">
+ <value>javax.validation.groups.Default</value>
+ </element>
+ </constraint>
+ </field>
+ </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/constraints-GroupIsNotAllowedAsElementNameTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MandatoryNameAttributeTest.xml (from rev 17345, beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-no-name.xml)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MandatoryNameAttributeTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MandatoryNameAttributeTest.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,13 @@
+<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="User" ignore-annotations="true">
+ <field>
+ <constraint annotation="javax.validation.constraints.Pattern">
+ <message>Last name has to start with with a capital letter.</message>
+ <element name="regexp">^[A-Z][a-z]+</element>
+ </constraint>
+ </field>
+ </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/constraints-MandatoryNameAttributeTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Copied: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MessageIsNotAllowedAsElementNameTest.xml (from rev 17345, beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-message-element.xml)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MessageIsNotAllowedAsElementNameTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MessageIsNotAllowedAsElementNameTest.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,13 @@
+<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="User" ignore-annotations="true">
+ <field name="lastname">
+ <constraint annotation="javax.validation.constraints.Pattern">
+ <element name="message">Last name has to start with with a capital letter.</element>
+ <element name="regexp">^[A-Z][a-z]+</element>
+ </constraint>
+ </field>
+ </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/constraints-MessageIsNotAllowedAsElementNameTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-group-element.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-group-element.xml 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-group-element.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -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</default-package>
- <bean class="User" ignore-annotations="true">
- <field name="lastname">
- <constraint annotation="javax.validation.constraints.Pattern">
- <message>Last name has to start with with a capital letter.</message>
- <element name="regexp">^[A-Z][a-z]+</element>
- <element name="groups">
- <value>javax.validation.groups.Default</value>
- </element>
- </constraint>
- </field>
- </bean>
-</constraint-mappings>
\ No newline at end of file
Deleted: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-message-element.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-message-element.xml 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-message-element.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,13 +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</default-package>
- <bean class="User" ignore-annotations="true">
- <field name="lastname">
- <constraint annotation="javax.validation.constraints.Pattern">
- <element name="message">Last name has to start with with a capital letter.</element>
- <element name="regexp">^[A-Z][a-z]+</element>
- </constraint>
- </field>
- </bean>
-</constraint-mappings>
\ No newline at end of file
Deleted: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-no-name.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-no-name.xml 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-no-name.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,13 +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</default-package>
- <bean class="User" ignore-annotations="true">
- <field>
- <constraint annotation="javax.validation.constraints.Pattern">
- <message>Last name has to start with with a capital letter.</message>
- <element name="regexp">^[A-Z][a-z]+</element>
- </constraint>
- </field>
- </bean>
-</constraint-mappings>
\ No newline at end of file
Added: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConstraintDeclarationTest.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConstraintDeclarationTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/package-constraints-ConstraintDeclarationTest.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,6 @@
+<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"/>
+</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/package-constraints-ConstraintDeclarationTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Added: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConstraintDeclarationTest.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConstraintDeclarationTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-ConstraintDeclarationTest.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,6 @@
+<?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/configuration 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-ConstraintDeclarationTest.xml</constraint-mapping>
+</validation-config>
\ No newline at end of file
Copied: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-GroupIsNotAllowedAsElementNameTest.xml (from rev 17345, beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-invalid-element-name-group.xml)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-GroupIsNotAllowedAsElementNameTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-GroupIsNotAllowedAsElementNameTest.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,8 @@
+<?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/configuration validation-configuration-1.0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <constraint-mapping>
+ /org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-GroupIsNotAllowedAsElementNameTest.xml
+ </constraint-mapping>
+</validation-config>
\ No newline at end of file
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-GroupIsNotAllowedAsElementNameTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MandatoryNameAttributeTest.xml (from rev 17345, beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-mandatory-name-attribute.xml)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MandatoryNameAttributeTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MandatoryNameAttributeTest.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,6 @@
+<?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/configuration validation-configuration-1.0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MandatoryNameAttributeTest.xml</constraint-mapping>
+</validation-config>
\ No newline at end of file
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MandatoryNameAttributeTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Copied: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MessageIsNotAllowedAsElementNameTest.xml (from rev 17345, beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-invalid-element-name-message.xml)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MessageIsNotAllowedAsElementNameTest.xml (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MessageIsNotAllowedAsElementNameTest.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -0,0 +1,6 @@
+<?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/configuration validation-configuration-1.0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-MessageIsNotAllowedAsElementNameTest.xml</constraint-mapping>
+</validation-config>
\ No newline at end of file
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-MessageIsNotAllowedAsElementNameTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-invalid-element-name-group.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-invalid-element-name-group.xml 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-invalid-element-name-group.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -1,8 +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/configuration validation-configuration-1.0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <constraint-mapping>
- /org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-group-element.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-invalid-element-name-message.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-invalid-element-name-message.xml 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-invalid-element-name-message.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -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/configuration validation-configuration-1.0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-message-element.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-mandatory-name-attribute.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-mandatory-name-attribute.xml 2009-08-20 16:11:54 UTC (rev 17379)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/validation-mandatory-name-attribute.xml 2009-08-20 16:14:04 UTC (rev 17380)
@@ -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/configuration validation-configuration-1.0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/constraints-with-no-name.xml</constraint-mapping>
-</validation-config>
\ No newline at end of file
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints-MultipleGetterDefinitionTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-ConstraintValidatorFactorySpecifiedInValidationXmlTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-MessageInterpolatorSpecifiedInValidationXmlNoDefaultConstructorTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-MessageInterpolatorSpecifiedInValidationXmlTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-MultipleFieldDefinitionTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-MultipleGetterDefinitionTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-TraversableResolverSpecifiedInValidationXmlNoDefaultConstructorTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-TraversableResolverSpecifiedInValidationXmlTest.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: beanvalidation/trunk/validation-tck/src/main/resources/tck-tests.xml
___________________________________________________________________
Name: svn:keywords
+ Id
15 years, 3 months
Hibernate SVN: r17379 - in validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation: xml and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-20 12:11:54 -0400 (Thu, 20 Aug 2009)
New Revision: 17379
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/AnnotationIgnores.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/XmlMappingParser.java
Log:
made sure AnotationIgnres uses the right defaults, fixed some typos
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/AnnotationIgnores.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/AnnotationIgnores.java 2009-08-20 14:06:52 UTC (rev 17378)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/AnnotationIgnores.java 2009-08-20 16:11:54 UTC (rev 17379)
@@ -40,7 +40,7 @@
/**
* Keeps track whether the 'ignore-annotations' flag is set on bean level in the xml configuration. If 'ignore-annotations'
- * is not specified <code>false</code> is the default.
+ * is not specified <code>true</code> is the default.
*/
private final Map<Class<?>, Boolean> ignoreAnnotationDefaults = new HashMap<Class<?>, Boolean>();
@@ -55,7 +55,7 @@
public void setDefaultIgnoreAnnotation(Class<?> clazz, Boolean b) {
if ( b == null ) {
- ignoreAnnotationDefaults.put( clazz, Boolean.FALSE );
+ ignoreAnnotationDefaults.put( clazz, Boolean.TRUE );
}
else {
ignoreAnnotationDefaults.put( clazz, b );
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/XmlMappingParser.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/XmlMappingParser.java 2009-08-20 14:06:52 UTC (rev 17378)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/XmlMappingParser.java 2009-08-20 16:11:54 UTC (rev 17379)
@@ -71,7 +71,7 @@
private static final String VALIDATION_MAPPING_XSD = "META-INF/validation-mapping-1.0.xsd";
private static final String MESSAGE_PARAM = "message";
private static final String GROUPS_PARAM = "groups";
- private static final String PACKAGE_SEPERATOR = ".";
+ private static final String PACKAGE_SEPARATOR = ".";
private final Set<Class<?>> processedClasses = new HashSet<Class<?>>();
private final ConstraintHelper constraintHelper;
@@ -195,9 +195,9 @@
}
private List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> findConstraintValidatorClasses(Class<? extends Annotation> annotationType) {
- List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintValidatorDefinitonClasses = new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>();
+ List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintValidatorDefinitionClasses = new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>();
if ( constraintHelper.isBuiltinConstraint( annotationType ) ) {
- constraintValidatorDefinitonClasses.addAll( constraintHelper.getBuiltInConstraints( annotationType ) );
+ constraintValidatorDefinitionClasses.addAll( constraintHelper.getBuiltInConstraints( annotationType ) );
}
else {
Class<? extends ConstraintValidator<?, ?>>[] validatedBy = annotationType
@@ -208,10 +208,10 @@
//FIXME if yes wrap into VE, if no we need to test the type here
//Once resolved,we can @SuppressWarning("unchecked") on the cast
Class<? extends ConstraintValidator<? extends Annotation, ?>> safeValidator = validator;
- constraintValidatorDefinitonClasses.add( safeValidator );
+ constraintValidatorDefinitionClasses.add( safeValidator );
}
}
- return constraintValidatorDefinitonClasses;
+ return constraintValidatorDefinitionClasses;
}
private void checkClassHasNotBeenProcessed(Set<Class<?>> processedClasses, Class<?> beanClass) {
@@ -492,8 +492,8 @@
AnnotationDescriptor<A> annotationDescriptor = new AnnotationDescriptor<A>( returnType );
for ( ElementType elementType : annotationType.getElement() ) {
String name = elementType.getName();
- Class<?> paramterType = getAnnotationParameterType( returnType, name );
- Object elementValue = getElementValue( elementType, paramterType );
+ Class<?> parameterType = getAnnotationParameterType( returnType, name );
+ Object elementValue = getElementValue( elementType, parameterType );
annotationDescriptor.setValue( name, elementValue );
}
return AnnotationFactory.create( annotationDescriptor );
@@ -579,7 +579,7 @@
private void checkNameIsValid(String name) {
if ( MESSAGE_PARAM.equals( name ) || GROUPS_PARAM.equals( name ) ) {
- throw new ValidationException( MESSAGE_PARAM + " and " + GROUPS_PARAM + " are reserved paramter names." );
+ throw new ValidationException( MESSAGE_PARAM + " and " + GROUPS_PARAM + " are reserved parameter names." );
}
}
@@ -601,13 +601,13 @@
fullyQualifiedClass = clazz;
}
else {
- fullyQualifiedClass = defaultPackage + PACKAGE_SEPERATOR + clazz;
+ fullyQualifiedClass = defaultPackage + PACKAGE_SEPARATOR + clazz;
}
return loadClass( fullyQualifiedClass, this.getClass() );
}
private boolean isQualifiedClass(String clazz) {
- return clazz.contains( PACKAGE_SEPERATOR );
+ return clazz.contains( PACKAGE_SEPARATOR );
}
private ConstraintMappingsType getValidationConfig(InputStream in) {
15 years, 3 months
Hibernate SVN: r17377 - beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/application.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-20 09:55:45 -0400 (Thu, 20 Aug 2009)
New Revision: 17377
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/application/SuperWoman.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/application/ValidationRequirementTest.java
Log:
HV-204
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/application/SuperWoman.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/application/SuperWoman.java 2009-08-20 13:36:03 UTC (rev 17376)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/application/SuperWoman.java 2009-08-20 13:55:45 UTC (rev 17377)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
@@ -21,6 +21,8 @@
* @author Hardy Ferentschik
*/
public class SuperWoman extends Woman {
+ private String hiddenName = "Lane";
+
public SuperWoman() {
firstName = "Lois";
lastName = null;
@@ -31,6 +33,10 @@
}
public String getLastName() {
- return "Lane";
+ return hiddenName;
}
+
+ public void setHiddenName(String hiddenName) {
+ this.hiddenName = hiddenName;
+ }
}
\ No newline at end of file
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/application/ValidationRequirementTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/application/ValidationRequirementTest.java 2009-08-20 13:36:03 UTC (rev 17376)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/application/ValidationRequirementTest.java 2009-08-20 13:55:45 UTC (rev 17377)
@@ -94,6 +94,11 @@
Validator validator = TestUtil.getValidatorUnderTest();
Set<ConstraintViolation<SuperWoman>> violations = validator.validateProperty( superwoman, "firstName" );
assertCorrectNumberOfViolations( violations, 0 );
+
+ superwoman.setFirstName( null );
+ violations = validator.validateProperty( superwoman, "firstName" );
+ assertCorrectNumberOfViolations( violations, 1 );
+ assertCorrectConstraintTypes( violations, NotNull.class );
}
@Test
@@ -106,8 +111,13 @@
SuperWoman superwoman = new SuperWoman();
Validator validator = TestUtil.getValidatorUnderTest();
- Set<ConstraintViolation<SuperWoman>> violations = validator.validateProperty( superwoman, "firstName" );
+ Set<ConstraintViolation<SuperWoman>> violations = validator.validateProperty( superwoman, "lastName" );
assertCorrectNumberOfViolations( violations, 0 );
+
+ superwoman.setHiddenName( null );
+ violations = validator.validateProperty( superwoman, "lastName" );
+ assertCorrectNumberOfViolations( violations, 1 );
+ assertCorrectConstraintTypes( violations, NotNull.class );
}
@Test
15 years, 3 months