You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by di...@apache.org on 2007/10/28 09:28:18 UTC
svn commit: r589303 -
/commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/JexlTest.java
Author: dion
Date: Sun Oct 28 01:28:17 2007
New Revision: 589303
URL: http://svn.apache.org/viewvc?rev=589303&view=rev
Log:
Move method tests to own test class
Modified:
commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/JexlTest.java
Modified: commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/JexlTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/JexlTest.java?rev=589303&r1=589302&r2=589303&view=diff
==============================================================================
--- commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/JexlTest.java (original)
+++ commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/JexlTest.java Sun Oct 28 01:28:17 2007
@@ -88,20 +88,6 @@
/**
* test a simple method expression
*/
- public void testMethod()
- throws Exception
- {
- /*
- * tests a simple method expression
- */
- JexlContext jc = JexlHelper.createContext();
- jc.getVars().put("foo", new Foo() );
- assertExpression(jc, "foo.bar()", METHOD_STRING);
- }
-
- /**
- * test a simple method expression
- */
public void testArrayAccess()
throws Exception
{
@@ -157,17 +143,6 @@
}
- public void testMulti()
- throws Exception
- {
- /*
- * tests a simple property expression
- */
- JexlContext jc = JexlHelper.createContext();
- jc.getVars().put("foo", new Foo() );
- assertExpression(jc, "foo.innerFoo.bar()", METHOD_STRING);
- }
-
public void testBoolean()
throws Exception
{
@@ -339,25 +314,6 @@
//assertExpression(jc, "foo.size", new Integer(22));
}
- /**
- * test some String method calls
- */
- public void testStringMethods()
- throws Exception
- {
- JexlContext jc = JexlHelper.createContext();
-
- jc.getVars().put("foo", "abcdef");
-
- assertExpression(jc, "foo.substring(3)", "def");
- assertExpression(jc, "foo.substring(0,(size(foo)-3))", "abc");
- assertExpression(jc, "foo.substring(0,size(foo)-3)", "abc");
- assertExpression(jc, "foo.substring(0,foo.length()-3)", "abc");
- assertExpression(jc, "foo.substring(0, 1+1)", "ab");
- }
-
-
-
/**
* test some simple mathematical calculations
*/
@@ -830,23 +786,6 @@
assertExpression(jc, "first + ' ' + second", "Hello World");
}
- /**
- * Ensures static methods on objects can be called.
- */
- public void testStaticMethodInvocation() throws Exception
- {
- JexlContext jc = JexlHelper.createContext();
- jc.getVars().put("aBool", Boolean.FALSE);
- assertExpression(jc, "aBool.valueOf('true')", Boolean.TRUE);
- }
-
- public void testStaticMethodInvocationOnClasses() throws Exception
- {
- JexlContext jc = JexlHelper.createContext();
- jc.getVars().put("Boolean", Boolean.class);
- assertExpression(jc, "Boolean.valueOf('true')", Boolean.TRUE);
- }
-
public void testToString() throws Exception {
String code = "abcd";
Expression expr = ExpressionFactory.createExpression(code);