File tree Expand file tree Collapse file tree 5 files changed +100
-1
lines changed
java/org/hibernate/validator/test/internal/xml
resources/org/hibernate/validator/test/internal/xml Expand file tree Collapse file tree 5 files changed +100
-1
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Hibernate Validator, declare and validate application constraints
3
+ *
4
+ * License: Apache License, Version 2.0
5
+ * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6
+ */
7
+ package org .hibernate .validator .test .internal .xml ;
8
+
9
+ import javax .validation .ValidationException ;
10
+
11
+ import org .hibernate .validator .testutil .ValidationXmlTestHelper ;
12
+ import org .hibernate .validator .testutil .ValidatorUtil ;
13
+ import org .testng .annotations .BeforeClass ;
14
+ import org .testng .annotations .Test ;
15
+
16
+ /**
17
+ * @author Hardy Ferentschik
18
+ * @author Gunnar Morling
19
+ */
20
+ public class InvalidXmlConfigurationTest {
21
+
22
+ private static ValidationXmlTestHelper validationXmlTestHelper ;
23
+
24
+ @ BeforeClass
25
+ public static void setupValidationXmlTestHelper () {
26
+ validationXmlTestHelper = new ValidationXmlTestHelper ( InvalidXmlConfigurationTest .class );
27
+ }
28
+
29
+ /**
30
+ * Tests requirement 8.a from the BV 1.1 spec.
31
+ */
32
+ @ Test (expectedExceptions =ValidationException .class , expectedExceptionsMessageRegExp ="HV000100.*" )
33
+ public void testInvalidValidationXml () {
34
+ validationXmlTestHelper .runWithCustomValidationXml (
35
+ "validation-InvalidXmlConfigurationTest.xml" , new Runnable () {
36
+
37
+ @ Override
38
+ public void run () {
39
+ ValidatorUtil .getValidator ();
40
+ }
41
+ }
42
+ );
43
+ }
44
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Hibernate Validator, declare and validate application constraints
3
+ *
4
+ * License: Apache License, Version 2.0
5
+ * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6
+ */
7
+ package org .hibernate .validator .test .internal .xml ;
8
+
9
+ import javax .validation .ValidationException ;
10
+
11
+ import org .hibernate .validator .testutil .ValidationXmlTestHelper ;
12
+ import org .hibernate .validator .testutil .ValidatorUtil ;
13
+ import org .testng .annotations .BeforeClass ;
14
+ import org .testng .annotations .Test ;
15
+
16
+ /**
17
+ * @author Gunnar Morling
18
+ */
19
+ public class UnknownVersionInValidationXmlTest {
20
+
21
+ private static ValidationXmlTestHelper validationXmlTestHelper ;
22
+
23
+ @ BeforeClass
24
+ public static void setupValidationXmlTestHelper () {
25
+ validationXmlTestHelper = new ValidationXmlTestHelper ( InvalidXmlConfigurationTest .class );
26
+ }
27
+
28
+ /**
29
+ * Tests requirement 8.1.4.c from the BV 1.1 spec.
30
+ */
31
+ @ Test (expectedExceptions =ValidationException .class , expectedExceptionsMessageRegExp ="HV000122.*" )
32
+ public void testInvalidValidationXml () {
33
+ validationXmlTestHelper .runWithCustomValidationXml (
34
+ "validation-UnknownVersionInValidationXmlTest.xml" , new Runnable () {
35
+
36
+ @ Override
37
+ public void run () {
38
+ ValidatorUtil .getValidator ();
39
+ }
40
+ }
41
+ );
42
+ }
43
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <validation-config xmlns =" http://jboss.org/xml/ns/javax/validation/configuration"
3
+ xsi : schemaLocation =" http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.0.xsd"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" >
5
+ </validation-confi >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <validation-config
3
+ xmlns =" http://jboss.org/xml/ns/javax/validation/configuration"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.1.xsd"
6
+ version =" 1.2" >
7
+ </validation-config >
Original file line number Diff line number Diff line change 20
20
<name >Hibernate Validator TCK Runner</name >
21
21
<description >Aggregates dependencies and runs the JSR-349 TCK</description >
22
22
<properties >
23
- <tck .version>1.1.2 .Final</tck .version>
23
+ <tck .version>1.1.4 .Final</tck .version>
24
24
<tck .suite.file>${project.build.directory} /dependency/beanvalidation-tck-tests-suite.xml</tck .suite.file>
25
25
<wildflyTargetDir >${project.build.directory}/wildfly-${wildfly.version}</wildflyTargetDir >
26
26
<validation .provider>org.hibernate.validator.HibernateValidator</validation .provider>
You can’t perform that action at this time.
0 commit comments