From d30b61a3052c29fc77f6468e12989601c1ae5bb5 Mon Sep 17 00:00:00 2001 From: Hardy Ferentschik Date: Fri, 26 Jun 2009 08:29:41 +0000 Subject: [PATCH] fixed the tests after the latest bean validation updates git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@16955 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../beanvalidation/HibernateTraversableResolverTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/annotations/src/test/java/org/hibernate/test/annotations/beanvalidation/HibernateTraversableResolverTest.java b/annotations/src/test/java/org/hibernate/test/annotations/beanvalidation/HibernateTraversableResolverTest.java index 1405632d9e..ef85f667e3 100644 --- a/annotations/src/test/java/org/hibernate/test/annotations/beanvalidation/HibernateTraversableResolverTest.java +++ b/annotations/src/test/java/org/hibernate/test/annotations/beanvalidation/HibernateTraversableResolverTest.java @@ -52,7 +52,8 @@ public class HibernateTraversableResolverTest extends TestCase { assertEquals( 1, e.getConstraintViolations().size() ); ConstraintViolation cv = e.getConstraintViolations().iterator().next(); assertEquals( Screen.class, cv.getRootBeanClass() ); - assertEquals( "stopButton.name", cv.getPropertyPath() ); + // toString works since hibernate validator's Path implementation works accordingly. Should do a Path comparison though + assertEquals( "stopButton.name", cv.getPropertyPath().toString() ); } tx.rollback(); @@ -131,7 +132,8 @@ public class HibernateTraversableResolverTest extends TestCase { assertEquals( 1, e.getConstraintViolations().size() ); final ConstraintViolation constraintViolation = e.getConstraintViolations().iterator().next(); assertEquals( Screen.class, constraintViolation.getRootBeanClass() ); - assertEquals( "connectors[].number", constraintViolation.getPropertyPath() ); + // toString works since hibernate validator's Path implementation works accordingly. Should do a Path comparison though + assertEquals( "connectors[].number", constraintViolation.getPropertyPath().toString() ); } tx.rollback();