bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r996985 - /incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/Jsr303Test.java
Date Tue, 14 Sep 2010 17:00:00 GMT
Author: mbenson
Date: Tue Sep 14 17:00:00 2010
New Revision: 996985

URL: http://svn.apache.org/viewvc?rev=996985&view=rev
Log:
remove unnecessary test complication

Modified:
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/Jsr303Test.java

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/Jsr303Test.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/Jsr303Test.java?rev=996985&r1=996984&r2=996985&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/Jsr303Test.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/test/java/org/apache/bval/jsr303/Jsr303Test.java
Tue Sep 14 17:00:00 2010
@@ -101,15 +101,6 @@ public class Jsr303Test extends TestCase
         return factory.getValidator();
     }
 
-    /**
-     * If testing a {@link Validator} implementation that does NOT
-     * cache the descriptor types, override and return false.
-     * @return boolean
-     */
-    protected boolean isDescriptorCachingImpl() {
-        return true;
-    }
-
     public void testPropertyDescriptorHasConstraints() {
         BeanDescriptor cons = validator.getConstraintsForClass(Book.class);
         assertTrue(cons.getConstraintsForProperty("author").hasConstraints());
@@ -143,7 +134,7 @@ public class Jsr303Test extends TestCase
 
     public void testMetadataAPI_Book() {
         Assert.assertNotNull(validator.getConstraintsForClass(Book.class));
-        Assert.assertEquals(isDescriptorCachingImpl(), validator.getConstraintsForClass(Book.class)
== validator.getConstraintsForClass(Book.class));
+        Assert.assertSame(validator.getConstraintsForClass(Book.class), validator.getConstraintsForClass(Book.class));
         BeanDescriptor bc = validator.getConstraintsForClass(Book.class);
         // assertEquals(ElementType.TYPE, bc.getElementType());
         Assert.assertEquals(Book.class, bc.getElementClass());



Mime
View raw message