use of javax.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testBug57855d.
@Test
public void testBug57855d() {
MethodExpression me = factory.createMethodExpression(context, "${beanB.echo}", null, new Class[] { String.class });
Object r = me.invoke(context, new String[] { "aaa" });
assertEquals("aaa", r.toString());
}
use of javax.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testBug53792c.
@Test
public void testBug53792c() {
MethodExpression me = factory.createMethodExpression(context, "#{beanB.sayHello().length()}", null, new Class<?>[] {});
Integer result = (Integer) me.invoke(context, null);
assertEquals(beanB.sayHello().length(), result.intValue());
}
use of javax.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testInvokeWithSuperABReturnTypeNoParamTypes.
@Test
public void testInvokeWithSuperABReturnTypeNoParamTypes() {
MethodExpression me3 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanB)}", String.class, null);
Object r3 = me3.invoke(context, null);
assertEquals("AB: Hello A from B", r3.toString());
}
use of javax.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testInvokeWithSuperABNoReturnTypeNoParamTypes.
@Test
public void testInvokeWithSuperABNoReturnTypeNoParamTypes() {
MethodExpression me2 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanB)}", null, null);
Object r2 = me2.invoke(context, null);
assertEquals("AB: Hello A from B", r2.toString());
}
use of javax.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testInvokeWithSuperABNoReturnTypeParamTypes.
@Test
public void testInvokeWithSuperABNoReturnTypeParamTypes() {
MethodExpression me4 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanB)}", null, new Class<?>[] { TesterBeanA.class, TesterBeanB.class });
Object r4 = me4.invoke(context, null);
assertEquals("AB: Hello A from B", r4.toString());
}
Aggregations