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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to