You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by he...@apache.org on 2009/12/11 15:07:22 UTC

svn commit: r889627 - in /commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2: ./ internal/ internal/introspection/ util/introspection/

Author: henrib
Date: Fri Dec 11 14:07:21 2009
New Revision: 889627

URL: http://svn.apache.org/viewvc?rev=889627&view=rev
Log:
moved tests to correct package; prepared public field test integration

Added:
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/internal/
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/internal/introspection/
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/internal/introspection/DiscoveryTest.java
      - copied unchanged from r889308, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/util/introspection/DiscoveryTest.java
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/internal/introspection/MethodKeyTest.java
      - copied unchanged from r889308, commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/util/introspection/MethodKeyTest.java
Removed:
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/util/introspection/DiscoveryTest.java
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/util/introspection/MethodKeyTest.java
Modified:
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreatorTest.java
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ForEachTest.java
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTest.java
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTestCase.java

Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreatorTest.java?rev=889627&r1=889626&r2=889627&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreatorTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ClassCreatorTest.java Fri Dec 11 14:07:21 2009
@@ -187,7 +187,4 @@
         }
     }
 
-    static public void main(String[] args) throws Exception {
-        (new ClassCreatorTest()).runTest("testMany");
-    }
 }

Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ForEachTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ForEachTest.java?rev=889627&r1=889626&r2=889627&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ForEachTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ForEachTest.java Fri Dec 11 14:07:21 2009
@@ -132,8 +132,4 @@
         Object o = e.evaluate(jc);
         assertEquals("Result is not last evaluated expression", "brie", o);
     }
-
-    static public void main(String[] args) throws Exception {
-        (new ForEachTest("*")).runTest("testForEachWithIteratorMethod");
-    }
 }
\ No newline at end of file

Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java?rev=889627&r1=889626&r2=889627&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java Fri Dec 11 14:07:21 2009
@@ -320,7 +320,4 @@
         assertEquals("bye...", script.execute(ctxt));
     }
 
-    public static void main(String[] args) throws Exception {
-        runTest("IssuesTest", "test11");
-    }
 }

Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTest.java?rev=889627&r1=889626&r2=889627&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTest.java Fri Dec 11 14:07:21 2009
@@ -30,7 +30,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.jexl2.parser.ParseException;
 import org.apache.commons.jexl2.parser.Parser;
 
 /**

Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTestCase.java?rev=889627&r1=889626&r2=889627&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTestCase.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/JexlTestCase.java Fri Dec 11 14:07:21 2009
@@ -41,14 +41,22 @@
     private static final Class<?>[] stringParm = {String.class};
 
     /** A default Jexl engine instance. */
-    protected final JexlEngine JEXL = new JexlEngine();
+    protected final JexlEngine JEXL;
 
     public JexlTestCase(String name) {
+        this(name, new JexlEngine());
+    }
+    protected JexlTestCase(String name, JexlEngine jexl) {
         super(name);
+        JEXL = jexl;
         JEXL.setCache(512);
     }
     public JexlTestCase() {
+        this(new JexlEngine());
+    }
+    protected JexlTestCase(JexlEngine jexl) {
         super();
+        JEXL = jexl;
         JEXL.setCache(512);
     }