Author: hardy.ferentschik
Date: 2009-06-12 07:20:08 -0400 (Fri, 12 Jun 2009)
New Revision: 16765
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserInformation.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserValidator.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CustomConsistentUserValidator.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/EmptyXmlConfigurationTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/InvalidXmlConfigurationTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Optional.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Order.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/OrderLine.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TestGroup.java
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/UserType.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints-no-additional-config.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-invalid-xml.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-no-additional-config.xml
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation.xml
Modified:
beanvalidation/trunk/validation-tck/pom.xml
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java
Log:
Added some xml config tests
Modified: beanvalidation/trunk/validation-tck/pom.xml
===================================================================
--- beanvalidation/trunk/validation-tck/pom.xml 2009-06-11 19:44:59 UTC (rev 16764)
+++ beanvalidation/trunk/validation-tck/pom.xml 2009-06-12 11:20:08 UTC (rev 16765)
@@ -232,7 +232,7 @@
<distributionManagement>
<repository>
<!-- Copy the dist to the local checkout of the JBoss maven2 repo
${maven.repository.root} -->
- <!-- It is anticipated that ${maven.repository.root} be set in user's
settings.xml -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's
settings.xmlconfiguration -->
<!-- todo : replace this with direct svn access once the svnkit providers
are available -->
<id>repository.jboss.org</id>
<url>file://${maven.repository.root}</url>
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserInformation.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserInformation.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserInformation.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,52 @@
+// $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;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.constraints.Pattern;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Constraint(validatedBy = ConsistentUserValidator.class)
+@Documented
+@Target({ METHOD, FIELD, TYPE })
+@Retention(RUNTIME)
+public @interface ConsistentUserInformation {
+ public abstract String message() default "User information is not
consistent.";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract String stringParam() default "";
+
+ public abstract String[] stringArrayParam() default { };
+
+ public abstract int intParam() default 0;
+
+ public abstract Pattern[] patterns();
+
+ public abstract UserType userType() default UserType.BUYER;
+}
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserInformation.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserValidator.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserValidator.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserValidator.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,34 @@
+// $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;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ConsistentUserValidator implements
ConstraintValidator<ConsistentUserInformation, User> {
+
+ public void initialize(ConsistentUserInformation parameters) {
+ }
+
+ public boolean isValid(User user, ConstraintValidatorContext constraintValidatorContext)
{
+ return user.isConsistent();
+ }
+}
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/ConsistentUserValidator.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,37 @@
+// $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;
+
+import javax.validation.constraints.Pattern;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CreditCard {
+
+ @Pattern(regexp = "[0-9]+", message = "Not a credit casrd number.")
+ private String number;
+
+ public String getNumber() {
+ return number;
+ }
+
+ public void setNumber(String number) {
+ this.number = number;
+ }
+}
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CustomConsistentUserValidator.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CustomConsistentUserValidator.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CustomConsistentUserValidator.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,30 @@
+// $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;
+
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CustomConsistentUserValidator extends ConsistentUserValidator {
+
+ public boolean isValid(User user, ConstraintValidatorContext constraintValidatorContext)
{
+ return super.isValid( user, constraintValidatorContext );
+ }
+}
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CustomConsistentUserValidator.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/EmptyXmlConfigurationTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/EmptyXmlConfigurationTest.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/EmptyXmlConfigurationTest.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,51 @@
+// $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;
+
+
+import javax.validation.Validator;
+
+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 org.testng.annotations.Test;
+
+import org.hibernate.jsr303.tck.util.TestUtil;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Artifact(artifactType = ArtifactType.JSR303)
+(a)Classes(TestUtil.class)
+@ValidationXml(value = "validation-no-additional-config.xml")
+@Resource(source = "order-constraints-no-additional-config.xml",
+ destination =
"WEB-INF/classes/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints-no-additional-config.xml")
+public class EmptyXmlConfigurationTest extends AbstractTest {
+
+ @Test
+ public void testNoDefinedConstraints() {
+ Validator validator = TestUtil.getDefaultValidator();
+ assertFalse(
+ validator.getConstraintsForClass( Order.class ).isBeanConstrained(), "Bean
should be unsonstrained"
+ );
+ }
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/EmptyXmlConfigurationTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/InvalidXmlConfigurationTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/InvalidXmlConfigurationTest.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/InvalidXmlConfigurationTest.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,60 @@
+// $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;
+
+
+import javax.validation.ValidationException;
+
+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.util.TestUtil;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Artifact(artifactType = ArtifactType.JSR303)
+(a)Classes(TestUtil.class)
+@ValidationXml(value = "validation-invalid-xml.xml")
+public class InvalidXmlConfigurationTest extends AbstractTest {
+
+ @Test
+ public void testInvalidValidationXml() {
+ try {
+ TestUtil.getDefaultValidator();
+ fail();
+ }
+ catch ( ValidationException e ) {
+ // success
+ }
+ }
+
+//
+// @Test
+// public void testNoDefinedConstraints() {
+// Validator validator = getValidatorWithCustomConfiguration(
"org/hibernate/validation/engine/xmlconfiguration/validation.xmlconfiguration"
);
+// assertFalse(
+// validator.getConstraintsForClass( Order.class ).isBeanConstrained(), "Bean
should be unsonstrained"
+// );
+// }
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/InvalidXmlConfigurationTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Optional.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Optional.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Optional.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,24 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.jsr303.tck.tests.xmlconfiguration;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface Optional {
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Optional.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Order.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Order.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Order.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,32 @@
+// $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;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Order {
+
+ private Date orderDate;
+
+ private List<OrderLine> orderLines;
+
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/Order.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/OrderLine.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/OrderLine.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/OrderLine.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,24 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.jsr303.tck.tests.xmlconfiguration;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class OrderLine {
+}
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/OrderLine.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TestGroup.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TestGroup.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TestGroup.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,24 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.jsr303.tck.tests.xmlconfiguration;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public interface TestGroup {
+}
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/TestGroup.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
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/User.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/User.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,63 @@
+package org.hibernate.jsr303.tck.tests.xmlconfiguration;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+import javax.validation.groups.Default;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class User {
+
+ private boolean isConsistent;
+
+ private String firstname;
+
+ private String lastname;
+
+ private CreditCard creditcard;
+
+ @Pattern(regexp = "[0-9 -]+", message = "A phone number can only contain
numbers, whitespaces and dashes.", groups = Optional.class)
+ private String phoneNumber;
+
+ @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;
+ }
+
+ public String getPhoneNumber() {
+ return phoneNumber;
+ }
+
+ public void setPhoneNumber(String phoneNumber) {
+ this.phoneNumber = phoneNumber;
+ }
+
+ public void setConsistent(boolean consistent) {
+ isConsistent = consistent;
+ }
+
+ public boolean isConsistent() {
+ return isConsistent;
+ }
+
+ public CreditCard getCreditcard() {
+ return creditcard;
+ }
+
+ public void setCreditcard(CreditCard creditcard) {
+ this.creditcard = creditcard;
+ }
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/User.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/UserType.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/UserType.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/UserType.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,26 @@
+// $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;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public enum UserType {
+ BUYER,
+ SELLER
+}
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/UserType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
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
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,159 @@
+// $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;
+
+import java.util.Set;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validator;
+
+import org.jboss.testharness.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ArtifactType;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.jsr303.ValidationXml;
+import org.testng.annotations.Test;
+
+import org.hibernate.jsr303.tck.util.TestUtil;
+import static
org.hibernate.jsr303.tck.util.TestUtil.assertCorrectConstraintViolationMessage;
+import static org.hibernate.jsr303.tck.util.TestUtil.assertCorrectNumberOfViolations;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Artifact(artifactType = ArtifactType.JSR303)
+(a)Classes(TestUtil.class)
+@ValidationXml(value = "validation.xml")
+@Resources(
+ {
+ @Resource(source = "user-constraints.xml",
+ 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")
+ }
+)
+public class XmlConfigurationTest extends AbstractTest {
+
+ @Test
+ public void testClassConstraintDefinedInXml() {
+ Validator validator = TestUtil.getDefaultValidator();
+
+ User user = new User();
+ Set<ConstraintViolation<User>> constraintViolations = validator.validate(
user );
+ assertCorrectNumberOfViolations( constraintViolations, 1 );
+ assertCorrectConstraintViolationMessage(
+ constraintViolations.iterator().next(), "Message from xml"
+ );
+
+ user.setConsistent( true );
+ constraintViolations = validator.validate( user );
+ assertCorrectNumberOfViolations( constraintViolations, 0 );
+ }
+
+ @Test
+ public void testPropertyConstraintDefinedInXml() {
+ Validator validator = TestUtil.getDefaultValidator();
+
+ User user = new User();
+ user.setConsistent( true );
+ user.setFirstname( "Wolfeschlegelsteinhausenbergerdorff" );
+
+ Set<ConstraintViolation<User>> constraintViolations = validator.validate(
user );
+ assertCorrectNumberOfViolations( constraintViolations, 1 );
+ assertCorrectConstraintViolationMessage( constraintViolations.iterator().next(),
"Size is limited!" );
+
+ user.setFirstname( "Wolfgang" );
+ constraintViolations = validator.validate( user );
+ assertCorrectNumberOfViolations( constraintViolations, 0 );
+ }
+
+ @Test
+ public void testFieldConstraintDefinedInXml() {
+ Validator validator = TestUtil.getDefaultValidator();
+
+ User user = new User();
+ user.setConsistent( true );
+ user.setFirstname( "Wolfgang" );
+ user.setLastname( "doe" );
+
+ Set<ConstraintViolation<User>> constraintViolations = validator.validate(
user );
+ assertCorrectNumberOfViolations( constraintViolations, 1 );
+ assertCorrectConstraintViolationMessage(
+ constraintViolations.iterator().next(), "Last name has to start with with a
capital letter."
+ );
+
+ user.setLastname( "Doe" );
+ constraintViolations = validator.validate( user );
+ assertCorrectNumberOfViolations( constraintViolations, 0 );
+ }
+
+ @Test
+ public void testAnnotationDefinedConstraintApplies() {
+ Validator validator = TestUtil.getDefaultValidator();
+
+ User user = new User();
+ user.setConsistent( true );
+ user.setPhoneNumber( "police" );
+
+ Set<ConstraintViolation<User>> constraintViolations = validator.validate(
user );
+ assertCorrectNumberOfViolations( constraintViolations, 1 );
+ assertCorrectConstraintViolationMessage(
+ constraintViolations.iterator().next(),
+ "A phone number can only contain numbers, whitespaces and dashes."
+ );
+
+ user.setPhoneNumber( "112" );
+ constraintViolations = validator.validate( user );
+ assertCorrectNumberOfViolations( constraintViolations, 0 );
+ }
+
+ @Test
+ public void testCascadingConfiguredInXml() {
+ Validator validator = TestUtil.getDefaultValidator();
+
+ User user = new User();
+ user.setConsistent( true );
+ CreditCard card = new CreditCard();
+ card.setNumber( "not a number" );
+ user.setCreditcard( card );
+
+ Set<ConstraintViolation<User>> constraintViolations = validator.validate(
user );
+ assertCorrectNumberOfViolations( constraintViolations, 1 );
+ assertCorrectConstraintViolationMessage(
+ constraintViolations.iterator().next(),
+ "Not a credit casrd number."
+ );
+
+ card.setNumber( "1234567890" );
+ constraintViolations = validator.validate( user );
+ assertCorrectNumberOfViolations( constraintViolations, 0 );
+ }
+
+// @Test(expectedExceptions = ValidationException.class)
+// public void testInvalidValidationXml() {
+// getValidatorWithCustomConfiguration(
"META-INF/validation-invalid-xmlconfiguration.xmlconfiguration" );
+// }
+//
+// @Test
+// public void testNoDefinedConstraints() {
+// Validator validator = getValidatorWithCustomConfiguration(
"org/hibernate/validation/engine/xmlconfiguration/validation.xmlconfiguration"
);
+// assertFalse(
+// validator.getConstraintsForClass( Order.class ).isBeanConstrained(), "Bean
should be unsonstrained"
+// );
+// }
+}
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java 2009-06-11
19:44:59 UTC (rev 16764)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java 2009-06-12
11:20:08 UTC (rev 16765)
@@ -17,10 +17,10 @@
*/
package org.hibernate.jsr303.tck.util;
+import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
-import java.lang.annotation.Annotation;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
@@ -42,12 +42,18 @@
public static <T> void assertCorrectConstraintType(ConstraintViolation<T>
violation, Class<?> expectedConstraintType) {
assertEquals(
- (( Annotation
)violation.getConstraintDescriptor().getAnnotation()).annotationType().getName(),
+ ( ( Annotation ) violation.getConstraintDescriptor().getAnnotation()
).annotationType().getName(),
expectedConstraintType.getName(),
"Wrong constraint type"
);
}
+ public static <T> void
assertCorrectConstraintViolationMessage(ConstraintViolation<T> violation, String
message) {
+ assertEquals(
+ violation.getMessage(), message, "Wrong error message"
+ );
+ }
+
public static <T> void
assertCorrectNumberOfViolations(Set<ConstraintViolation<T>> violations, int
expectedViolations) {
assertEquals( violations.size(), expectedViolations, "Wrong number of constraint
violations" );
}
@@ -55,14 +61,16 @@
public static <T> void
assertCorrectConstraintTypes(Set<ConstraintViolation<T>> violations,
Class<?>[] expectedConsraintTypes) {
List<String> constraintTypes = new ArrayList<String>();
for ( ConstraintViolation<?> violation : violations ) {
- constraintTypes.add( (( Annotation
)violation.getConstraintDescriptor().getAnnotation()).annotationType().getName() );
+ constraintTypes.add(
+ ( ( Annotation ) violation.getConstraintDescriptor().getAnnotation()
).annotationType().getName()
+ );
}
assertEquals( expectedConsraintTypes.length, constraintTypes.size(), "Wring number
of constraint types." );
for ( Class<?> expectedConstraintType : expectedConsraintTypes ) {
assertTrue(
- constraintTypes.contains(expectedConstraintType.getName()),
+ constraintTypes.contains( expectedConstraintType.getName() ),
"The constraint type " + expectedConstraintType.getName() + " should
have been violated."
);
}
Added:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints-no-additional-config.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints-no-additional-config.xml
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints-no-additional-config.xml 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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="Order" ignore-annotations="false">
+ </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/order-constraints-no-additional-config.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints.xml
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints.xml 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,4 @@
+<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">
+</constraint-mappings>
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints.xml
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints.xml 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,60 @@
+<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="false">
+ <class ignore-annotations="true">
+ <group-sequence>
+ <value>User</value>
+ <value>Optional</value>
+ </group-sequence>
+ <constraint
annotation="org.hibernate.jsr303.tck.tests.xmlconfiguration.ConsistentUserInformation">
+ <message>Message from xml</message>
+ <groups>
+ <value>javax.validation.groups.Default</value>
+ </groups>
+ <element name="stringParam">foobar</element>
+ <element name="stringArrayParam">
+ <value>foo</value>
+ <value>bar</value>
+ </element>
+ <element name="intParam">
+ <value>42</value>
+ </element>
+ <element name="patterns">
+ <annotation>
+ <element name="regexp">myRegExp1</element>
+ </annotation>
+ <annotation>
+ <element name="regexp">myRegExp2</element>
+ </annotation>
+ </element>
+ <element name="userType">SELLER</element>
+ </constraint>
+ </class>
+ <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>
+ </constraint>
+ </field>
+ <field name="creditcard">
+ <valid/>
+ </field>
+ <getter name="firstname" ignore-annotations="true">
+ <constraint annotation="javax.validation.constraints.Size">
+ <message>Size is limited!</message>
+ <groups>
+
<value>org.hibernate.jsr303.tck.tests.xmlconfiguration.TestGroup</value>
+ <value>javax.validation.groups.Default</value>
+ </groups>
+ <element name="max">10</element>
+ </constraint>
+ </getter>
+ </bean>
+ <constraint-definition
annotation="org.hibernate.jsr303.tck.tests.xmlconfiguration.ConsistentUserInformation">
+ <validated-by include-existing-validators="false">
+
<value>org.hibernate.jsr303.tck.tests.xmlconfiguration.CustomConsistentUserValidator</value>
+ </validated-by>
+ </constraint-definition>
+</constraint-mappings>
Property changes on:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-invalid-xml.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-invalid-xml.xml
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-invalid-xml.xml 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<validation-config
xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
+
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configu...
validation-configuration-1.0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+</validation-confi>
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-invalid-xml.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-no-additional-config.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-no-additional-config.xml
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation-no-additional-config.xml 2009-06-12
11:20:08 UTC (rev 16765)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<validation-config
+
xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configu...
validation-configuration-1.0.xsd">
+
+
<constraint-mapping>org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints-no-additional-config.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/validation-no-additional-config.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation.xml
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation.xml 2009-06-12
11:20:08 UTC (rev 16765)
@@ -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/configu...
validation-configuration-1.0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
<constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints.xml</constraint-mapping>
+
<constraint-mapping>org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints.xml</constraint-mapping>
+ <property name="javax.validation.test">foobar</property>
+</validation-config>
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native