Author: epbernard
Date: 2007-03-29 13:39:59 -0400 (Thu, 29 Mar 2007)
New Revision: 11370
Modified:
trunk/HibernateExt/validator/src/test/org/hibernate/validator/test/Address.java
trunk/HibernateExt/validator/src/test/org/hibernate/validator/test/ValidatorTest.java
Log:
minor test
Modified: trunk/HibernateExt/validator/src/test/org/hibernate/validator/test/Address.java
===================================================================
---
trunk/HibernateExt/validator/src/test/org/hibernate/validator/test/Address.java 2007-03-29
15:55:41 UTC (rev 11369)
+++
trunk/HibernateExt/validator/src/test/org/hibernate/validator/test/Address.java 2007-03-29
17:39:59 UTC (rev 11370)
@@ -7,6 +7,7 @@
import org.hibernate.validator.NotNull;
import org.hibernate.validator.Pattern;
import org.hibernate.validator.Range;
+import org.hibernate.validator.Max;
/**
* @author Gavin King
@@ -25,7 +26,8 @@
private long id;
private boolean internalValid = true;
@Range(min = -2, max = 50, message = "{floor.out.of.range} (escaping #{el})")
- public int floor;
+ @Max(70)
+ public int floor;
public String getCountry() {
return country;
Modified:
trunk/HibernateExt/validator/src/test/org/hibernate/validator/test/ValidatorTest.java
===================================================================
---
trunk/HibernateExt/validator/src/test/org/hibernate/validator/test/ValidatorTest.java 2007-03-29
15:55:41 UTC (rev 11369)
+++
trunk/HibernateExt/validator/src/test/org/hibernate/validator/test/ValidatorTest.java 2007-03-29
17:39:59 UTC (rev 11370)
@@ -53,7 +53,7 @@
a.setCountry( "France" );
a.floor = 4000;
validationMessages = classValidator.getInvalidValues( a );
- assertEquals( 1, validationMessages.length );
+ assertEquals( 2, validationMessages.length );
assertEquals(
"Floor cannot " + ESCAPING_EL
+ " be lower that -2 and greater than 50 " + ESCAPING_EL,
Show replies by date