tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1044898 - in /tomcat/trunk/test/org/apache/el: TestMethodExpressionImpl.java TesterBeanB.java
Date Sun, 12 Dec 2010 19:50:45 GMT
Author: markt
Date: Sun Dec 12 19:50:45 2010
New Revision: 1044898

URL: http://svn.apache.org/viewvc?rev=1044898&view=rev
Log:
Add some tests for bug50449 but haven't reproduced it yet

Modified:
    tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java
    tomcat/trunk/test/org/apache/el/TesterBeanB.java

Modified: tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java?rev=1044898&r1=1044897&r2=1044898&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java (original)
+++ tomcat/trunk/test/org/apache/el/TestMethodExpressionImpl.java Sun Dec 12 19:50:45 2010
@@ -335,4 +335,18 @@ public class TestMethodExpressionImpl ex
                 "#{beanA.valLong}", java.lang.String.class);
         assertEquals("5", ve.getValue(context));
     }
+    
+    public void testBug50449a() throws Exception {
+        MethodExpression me1 = factory.createMethodExpression(context,
+                "${beanB.sayHello()}", null, null);
+        String actual = (String) me1.invoke(context, null);
+        assertEquals("Hello from B", actual);
+    }
+
+    public void testBug50449b() throws Exception {
+        MethodExpression me1 = factory.createMethodExpression(context,
+                "${beanB.sayHello('Tomcat')}", null, null);
+        String actual = (String) me1.invoke(context, null);
+        assertEquals("Hello Tomcat from B", actual);
+    }
 }

Modified: tomcat/trunk/test/org/apache/el/TesterBeanB.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TesterBeanB.java?rev=1044898&r1=1044897&r2=1044898&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/el/TesterBeanB.java (original)
+++ tomcat/trunk/test/org/apache/el/TesterBeanB.java Sun Dec 12 19:50:45 2010
@@ -28,6 +28,10 @@ public class TesterBeanB {
         this.name = name;
     }
     
+    public String sayHello() {
+        return "Hello from " + name;
+    }
+
     public String sayHello(String to) {
         return "Hello " + to + " from " + name;
     }



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


Mime
View raw message