Add an explicit test case for bug 49655
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 1 Aug 2010 21:04:25 +0000 (21:04 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 1 Aug 2010 21:04:25 +0000 (21:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@981318 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/el/TestMethodExpressionImpl.java

index 095d9f9..4a917af 100644 (file)
@@ -311,4 +311,19 @@ public class TestMethodExpressionImpl extends TestCase {
         Object r9 = me9.invoke(context, null);
         assertEquals("ABB[]: Hello AAA from BBB, BBB", r9.toString());
     }
+    
+    /*
+     * This is also tested implicitly in numerous places elsewhere in this
+     * class.
+     */
+    public void testBug49655() throws Exception {
+        // This is the call the failed
+        MethodExpression me = factory.createMethodExpression(context,
+                "#{beanA.setName('New value')}", null, null);
+        // The rest is to check it worked correctly
+        me.invoke(context, null);
+        ValueExpression ve = factory.createValueExpression(context,
+                "#{beanA.name}", java.lang.String.class);
+        assertEquals("New value", ve.getValue(context));
+    }
 }