velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r712012 - /velocity/tools/trunk/src/test/java/org/apache/velocity/tools/ClassToolTests.java
Date Thu, 06 Nov 2008 23:36:45 GMT
Author: nbubna
Date: Thu Nov  6 15:36:41 2008
New Revision: 712012

URL: http://svn.apache.org/viewvc?rev=712012&view=rev
Log:
check for both annotations on ValueParser and don't be picky about the order

Modified:
    velocity/tools/trunk/src/test/java/org/apache/velocity/tools/ClassToolTests.java

Modified: velocity/tools/trunk/src/test/java/org/apache/velocity/tools/ClassToolTests.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/test/java/org/apache/velocity/tools/ClassToolTests.java?rev=712012&r1=712011&r2=712012&view=diff
==============================================================================
--- velocity/tools/trunk/src/test/java/org/apache/velocity/tools/ClassToolTests.java (original)
+++ velocity/tools/trunk/src/test/java/org/apache/velocity/tools/ClassToolTests.java Thu Nov
 6 15:36:41 2008
@@ -28,6 +28,7 @@
 import java.util.Set;
 import org.apache.velocity.runtime.log.Log;
 import org.apache.velocity.tools.config.DefaultKey;
+import org.apache.velocity.tools.config.SkipSetters;
 import org.apache.velocity.tools.generic.ValueParser;
 import org.apache.velocity.tools.view.AbstractSearchTool;
 
@@ -108,8 +109,11 @@
         assertEquals(1, classTool.getAnnotations().size());
         classTool.setType(ValueParser.class);
         assertEquals(2, classTool.getAnnotations().size());
-        Annotation defaultKey = classTool.getAnnotations().get(1);
-        assertEquals(defaultKey.annotationType(), DefaultKey.class);
+        Class type0 = classTool.getAnnotations().get(0).annotationType();
+        Class type1 = classTool.getAnnotations().get(1).annotationType();
+        assertTrue(type0 != type1);
+        assertTrue(type0 == DefaultKey.class || type1 == DefaultKey.class);
+        assertTrue(type0 == SkipSetters.class || type1 == SkipSetters.class);
     }
 
     public @Test void methodGetConstructors() throws Exception



Mime
View raw message