Author: hardy.ferentschik
Date: 2009-08-25 11:25:56 -0400 (Tue, 25 Aug 2009)
New Revision: 17416
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java
Removed:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Address.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Author.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Book.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Car.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/GroupTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Zebra.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/XmlConfigurationTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MissingMandatoryElementTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java
Log:
made sure that tests verifying a interpolated message are not depending on a Locale. Fixed
several typos
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Address.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Address.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Address.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -32,7 +32,7 @@
@Size(max = 50, message = "Street names cannot have more than {max}
characters.")
private String street;
- @NotNull(groups = Default.class)
+ @NotNull(groups = Default.class, message = "Zipcode may not be null")
@Size(max = 5, message = "Zipcode cannot have more than {max} characters.")
private String zipcode;
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Author.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Author.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Author.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -30,7 +30,7 @@
@Size(min = 1, groups = First.class)
private String lastName;
- @Size(max = 20, groups = Last.class)
+ @Size(max = 20, groups = Last.class, message = "The company name can only have
{max} characters")
private String company;
public String getFirstName() {
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Book.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Book.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Book.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -26,11 +26,11 @@
* @author Hardy Ferentschik
*/
public class Book {
- @NotNull(groups = First.class)
+ @NotNull(groups = First.class, message = "The book title cannot be null")
@Size(min = 1, groups = First.class)
private String title;
- @Size(max = 30, groups = Second.class)
+ @Size(max = 30, groups = Second.class, message = "The book's subtitle can only
have {max} characters")
private String subtitle;
@Valid
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Car.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Car.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Car.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -29,7 +29,7 @@
@GroupSequence({ Car.class, Car.Test.class })
public class Car {
@Pattern(regexp = ".*", groups = Default.class)
- @Size(min = 2, max = 20, groups = Car.Test.class, message = "Car type has to be
betweeb {min} and {max} characters.")
+ @Size(min = 2, max = 20, groups = Car.Test.class, message = "Car type has to be
between {min} and {max} characters.")
private String type;
public String getType() {
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionTest.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionTest.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -66,7 +66,7 @@
ConstraintViolation<Address> violation = constraintViolations.iterator().next();
assertConstraintViolation( violation, Address.class, null, "zipcode" );
- assertCorrectConstraintViolationMessages( constraintViolations, "may not be
null" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "Zipcode may not
be null" );
address.setZipcode( "41841" );
@@ -92,19 +92,19 @@
Set<ConstraintViolation<Car>> constraintViolations = validator.validate(
car );
assertCorrectNumberOfViolations( constraintViolations, 1 );
assertCorrectConstraintViolationMessages(
- constraintViolations, "Car type has to be betweeb 2 and 20 characters."
+ constraintViolations, "Car type has to be between 2 and 20 characters."
);
constraintViolations = validator.validateProperty( car, "type" );
assertCorrectNumberOfViolations( constraintViolations, 1 );
assertCorrectConstraintViolationMessages(
- constraintViolations, "Car type has to be betweeb 2 and 20 characters."
+ constraintViolations, "Car type has to be between 2 and 20 characters."
);
constraintViolations = validator.validateValue( Car.class, "type",
"A" );
assertCorrectNumberOfViolations( constraintViolations, 1 );
assertCorrectConstraintViolationMessages(
- constraintViolations, "Car type has to be betweeb 2 and 20 characters."
+ constraintViolations, "Car type has to be between 2 and 20 characters."
);
}
Copied:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java
(from rev 17378,
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java)
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java
(rev 0)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -0,0 +1,56 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.hibernate.jsr303.tck.tests.constraints.groups;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Dictionary extends Book {
+ @NotNull(groups = Translate.class)
+ @Size(min = 1, groups = Translate.class)
+ private String translatesTo;
+
+ @NotNull(groups = Translate.class)
+ @Size(min = 1, groups = Translate.class)
+ private String translatesFrom;
+
+ public String getTranslatesTo() {
+ return translatesTo;
+ }
+
+ public void setTranslatesTo(String translatesTo) {
+ this.translatesTo = translatesTo;
+ }
+
+ public String getTranslatesFrom() {
+ return translatesFrom;
+ }
+
+ public void setTranslatesFrom(String translatesFrom) {
+ this.translatesFrom = translatesFrom;
+ }
+
+ /**
+ * Translator related constraints
+ */
+ public interface Translate {
+ }
+}
\ No newline at end of file
Property changes on:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Deleted:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -1,56 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.jsr303.tck.tests.constraints.groups;
-
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Dictonary extends Book {
- @NotNull(groups = Translate.class)
- @Size(min = 1, groups = Translate.class)
- private String translatesTo;
-
- @NotNull(groups = Translate.class)
- @Size(min = 1, groups = Translate.class)
- private String translatesFrom;
-
- public String getTranslatesTo() {
- return translatesTo;
- }
-
- public void setTranslatesTo(String translatesTo) {
- this.translatesTo = translatesTo;
- }
-
- public String getTranslatesFrom() {
- return translatesFrom;
- }
-
- public void setTranslatesFrom(String translatesFrom) {
- this.translatesFrom = translatesFrom;
- }
-
- /**
- * Translator related constraints
- */
- public interface Translate {
- }
-}
\ No newline at end of file
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/GroupTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/GroupTest.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/GroupTest.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -94,7 +94,7 @@
assertEquals(
constraintViolations.size(),
2,
- "There should be two violations against the explicit defualt group"
+ "There should be two violations against the explicit default group"
);
constraintViolations = validator.validate( user, User.Billable.class );
@@ -192,7 +192,7 @@
constraintViolations = validator.validate( book, First.class, Second.class, Last.class
);
assertCorrectNumberOfViolations( constraintViolations, 1 );
- assertCorrectConstraintViolationMessages( constraintViolations, "size must be
between 0 and 30" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "The book's
subtitle can only have 30 characters" );
constraintViolation = constraintViolations.iterator().next();
assertEquals( constraintViolation.getRootBean(), book, "Wrong root entity"
);
assertEquals( constraintViolation.getInvalidValue(), book.getSubtitle(), "Wrong
value" );
@@ -203,8 +203,8 @@
constraintViolations = validator.validate( book, First.class, Second.class, Last.class
);
constraintViolation = constraintViolations.iterator().next();
- assertEquals( constraintViolations.size(), 1, "Wrong number of constraints"
);
- assertEquals( constraintViolation.getMessage(), "size must be between 0 and
20" );
+ assertCorrectNumberOfViolations( constraintViolations, 1 );
+ assertCorrectConstraintViolationMessages( constraintViolations, "The company name
can only have 20 characters" );
assertEquals( constraintViolation.getRootBean(), book, "Wrong root entity"
);
assertEquals( constraintViolation.getInvalidValue(), author.getCompany(), "Wrong
value" );
assertCorrectPropertyPaths( constraintViolations, "author.company" );
@@ -233,7 +233,7 @@
constraintViolations = validator.validate( book, Book.All.class );
assertCorrectNumberOfViolations( constraintViolations, 1 );
- assertCorrectConstraintViolationMessages( constraintViolations, "may not be
null" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "The book title
cannot be null" );
ConstraintViolation constraintViolation = constraintViolations.iterator().next();
assertEquals( constraintViolation.getRootBean(), book, "Wrong root entity"
);
assertEquals( constraintViolation.getInvalidValue(), book.getTitle(), "Wrong
value" );
@@ -246,7 +246,7 @@
assertEquals( constraintViolations.size(), 1, "Wrong number of constraints"
);
book.setSubtitle( "Revised Edition" );
- author.setCompany( "JBoss a divison of RedHat" );
+ author.setCompany( "JBoss a division of RedHat" );
constraintViolations = validator.validate( book, Book.All.class );
assertEquals( constraintViolations.size(), 1, "Wrong number of constraints"
);
@@ -261,7 +261,7 @@
public void testGroupSequences() {
Validator validator = TestUtil.getValidatorUnderTest();
- Dictonary dictonary = new Dictonary();
+ Dictionary dictonary = new Dictionary();
dictonary.setTitle( "English - German" );
Author author = new Author();
author.setLastName( "-" );
@@ -269,7 +269,7 @@
author.setCompany( "Langenscheidt Publ." );
dictonary.setAuthor( author );
- Set<ConstraintViolation<Dictonary>> constraintViolations =
validator.validate( dictonary, DefaultAlias.class );
+ Set<ConstraintViolation<Dictionary>> constraintViolations =
validator.validate( dictonary, DefaultAlias.class );
assertEquals( constraintViolations.size(), 0, "Wrong number of constraints"
);
}
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -67,7 +67,7 @@
validator.validate( entity, InvalidGroupSequence.class );
}
catch ( GroupDefinitionException e ) {
- System.err.println( e.getMessage() );
+ // success
}
}
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -209,7 +209,7 @@
assertCorrectNumberOfViolations( constraintViolations, 2 );
ConstraintViolation constraintViolation = constraintViolations.iterator().next();
- assertEquals( "Everyone has a last name.", constraintViolation.getMessage(),
"Wrong message" );
+ assertEquals( constraintViolation.getMessage(), "Everyone has a last name.",
"Wrong message" );
assertEquals( constraintViolation.getRootBean(), clint, "Wrong root entity"
);
assertEquals( constraintViolation.getInvalidValue(), morgan.getLastName(), "Wrong
value" );
assertCorrectPropertyPaths(
@@ -241,7 +241,7 @@
Set<ConstraintViolation<Actor>> constraintViolations = validator.validate(
clint );
assertCorrectNumberOfViolations( constraintViolations, 2 );
ConstraintViolation constraintViolation = constraintViolations.iterator().next();
- assertEquals( "Everyone has a last name.", constraintViolation.getMessage(),
"Wrong message" );
+ assertEquals( constraintViolation.getMessage(), "Everyone has a last name.",
"Wrong message" );
assertEquals( constraintViolation.getRootBean(), clint, "Wrong root entity"
);
assertEquals( constraintViolation.getInvalidValue(), morgan.getLastName(), "Wrong
value" );
assertCorrectPropertyPaths(
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationTest.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationTest.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -148,7 +148,7 @@
Validator validator = TestUtil.getValidatorUnderTest();
Set<ConstraintViolation<MultiCage>> constraintViolations =
validator.validate( cage );
assertCorrectNumberOfViolations( constraintViolations, 2 );
- assertCorrectConstraintViolationMessages( constraintViolations, "may not be
null", "may not be null" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "A zebra needs a
name", "A zebra needs a name" );
}
@Test
@@ -163,7 +163,7 @@
Validator validator = TestUtil.getValidatorUnderTest();
Set<ConstraintViolation<GameReserve<Zebra>>> constraintViolations =
validator.validate( reserve );
assertCorrectNumberOfViolations( constraintViolations, 2 );
- assertCorrectConstraintViolationMessages( constraintViolations, "may not be
null", "may not be null" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "A zebra needs a
name", "A zebra needs a name" );
}
@Test
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Zebra.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Zebra.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Zebra.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
@@ -29,7 +29,7 @@
this.name = name;
}
- @NotNull
+ @NotNull(message = "A zebra needs a name")
public String getName() {
return name;
}
Modified:
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 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -24,7 +24,7 @@
*/
public class CreditCard {
- @Pattern(regexp = "[0-9]+", message = "Not a credit casrd number.")
+ @Pattern(regexp = "[0-9]+", message = "Not a credit card number.")
private String number;
public String getNumber() {
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-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -205,7 +205,7 @@
Set<ConstraintViolation<User>> constraintViolations = validator.validate(
user );
assertCorrectNumberOfViolations( constraintViolations, 1 );
- assertCorrectConstraintViolationMessages( constraintViolations, "Not a credit
casrd number." );
+ assertCorrectConstraintViolationMessages( constraintViolations, "Not a credit card
number." );
card.setNumber( "1234567890" );
constraintViolations = validator.validate( user );
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MissingMandatoryElementTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MissingMandatoryElementTest.java 2009-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MissingMandatoryElementTest.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -47,11 +47,10 @@
public void testMissingMandatoryElementInConstraintDeclaration() {
try {
TestUtil.getValidatorUnderTest();
- fail("Creating the validator should have failed since the constraint declaration
in xml is incomplete.");
+ fail( "Creating the validator should have failed since the constraint declaration
in xml is incomplete." );
}
catch ( ValidationException e ) {
// success
- System.err.println( e.getMessage() );
}
}
}
\ No newline at end of file
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-08-25
15:20:45 UTC (rev 17415)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java 2009-08-25
15:25:56 UTC (rev 17416)
@@ -47,7 +47,7 @@
*/
public final class TestUtil {
- private static String VALIDIDATION_PROVIDER_TEST_CLASS =
"validation.provider";
+ private static String VALIDATION_PROVIDER_TEST_CLASS = "validation.provider";
private static ValidationProvider<?> validationProviderUnderTest;
@@ -111,7 +111,7 @@
actualMessages.remove( expectedMessage );
}
assertTrue(
- actualMessages.isEmpty(), "Actual messages contained more messages as specidied
expected messages"
+ actualMessages.isEmpty(), "Actual messages contained more messages as specified
expected messages"
);
}
@@ -251,28 +251,28 @@
private static <U extends ValidationProvider<?>> void
instantiateValidationProviderUnderTest() {
- String validatorproviderClassName = System.getProperty(
VALIDIDATION_PROVIDER_TEST_CLASS );
- if ( validatorproviderClassName == null ) {
+ String validatorProviderClassName = System.getProperty( VALIDATION_PROVIDER_TEST_CLASS
);
+ if ( validatorProviderClassName == null ) {
throw new RuntimeException(
- "The test harness must specify the class name of the validation provider under
test. Set system property '" + VALIDIDATION_PROVIDER_TEST_CLASS +
"'"
+ "The test harness must specify the class name of the validation provider under
test. Set system property '" + VALIDATION_PROVIDER_TEST_CLASS +
"'"
);
}
Class<U> providerClass;
try {
@SuppressWarnings("unchecked")
- Class<U> tmpClazz = ( Class<U> )
TestUtil.class.getClassLoader().loadClass( validatorproviderClassName );
+ Class<U> tmpClazz = ( Class<U> )
TestUtil.class.getClassLoader().loadClass( validatorProviderClassName );
providerClass = tmpClazz;
}
catch ( ClassNotFoundException e ) {
- throw new RuntimeException( "Unable to load " + validatorproviderClassName
);
+ throw new RuntimeException( "Unable to load " + validatorProviderClassName
);
}
try {
validationProviderUnderTest = providerClass.newInstance();
}
catch ( Exception e ) {
- throw new RuntimeException( "Unable to instantiate " +
validatorproviderClassName );
+ throw new RuntimeException( "Unable to instantiate " +
validatorProviderClassName );
}
}
@@ -285,7 +285,7 @@
*/
private static final Pattern pathPattern = Pattern.compile(
"(\\w+)(\\[(\\w*)\\])?(\\.(.*))*" );
- private static final String PROPERTY_PATH_SEPERATOR = ".";
+ private static final String PROPERTY_PATH_SEPARATOR = ".";
private final List<Node> nodeList;
@@ -328,7 +328,7 @@
Node node = iter.next();
builder.append( node.toString() );
if ( iter.hasNext() ) {
- builder.append( PROPERTY_PATH_SEPERATOR );
+ builder.append( PROPERTY_PATH_SEPARATOR );
}
}
return builder.toString();