commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jexl/src/test/org/apache/commons/jexl JexlTest.java
Date Wed, 18 Aug 2004 06:40:01 GMT
dion        2004/08/17 23:40:01

  Modified:    jexl/src/test/org/apache/commons/jexl JexlTest.java
  Log:
  Add test to make sure static methods can be called on instances
  
  Revision  Changes    Path
  1.40      +13 -1     jakarta-commons/jexl/src/test/org/apache/commons/jexl/JexlTest.java
  
  Index: JexlTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jexl/src/test/org/apache/commons/jexl/JexlTest.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- JexlTest.java	17 Aug 2004 13:20:48 -0000	1.39
  +++ JexlTest.java	18 Aug 2004 06:40:01 -0000	1.40
  @@ -1089,6 +1089,18 @@
       }
   
       /**
  +     * Ensures static methods on objects can be called.
  +     */
  +    public void testStaticMethodInvocation() throws Exception
  +    {
  +        JexlContext jc = JexlHelper.createContext();
  +        jc.getVars().put("aBool", Boolean.FALSE);
  +        Expression expr = ExpressionFactory.createExpression("aBool.valueOf('true')");
  +        Boolean result = (Boolean)expr.evaluate(jc);
  +        assertEquals("Static method evaluation failed: " + result, Boolean.TRUE, result);
  +    }
  +    
  +    /**
        * Asserts that the given expression returns the given value when applied to the
        * given context
        */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message