use of jakarta.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testBug50449b.
@Test
public void testBug50449b() throws Exception {
MethodExpression me1 = factory.createMethodExpression(context, "${beanB.sayHello('Tomcat')}", null, null);
String actual = (String) me1.invoke(context, null);
Assert.assertEquals("Hello Tomcat from B", actual);
}
use of jakarta.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testInvokeWithSuperABB.
@Test
public void testInvokeWithSuperABB() {
MethodExpression me6 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanBB)}", null, null);
Object r6 = me6.invoke(context, null);
Assert.assertEquals("ABB: Hello A from BB", r6.toString());
}
use of jakarta.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testInvokeWithSuperABBB.
@Test
public void testInvokeWithSuperABBB() {
MethodExpression me7 = factory.createMethodExpression(context, "${beanC.sayHello(beanA,beanBBB)}", null, null);
Object r7 = me7.invoke(context, null);
Assert.assertEquals("ABB: Hello A from BBB", r7.toString());
}
use of jakarta.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testBug53792a.
@Test
public void testBug53792a() {
MethodExpression me = factory.createMethodExpression(context, "${beanA.setBean(beanB)}", null, new Class<?>[] { TesterBeanB.class });
me.invoke(context, null);
me = factory.createMethodExpression(context, "${beanB.setName('" + BUG53792 + "')}", null, new Class<?>[] { TesterBeanB.class });
me.invoke(context, null);
ValueExpression ve = factory.createValueExpression(context, "#{beanA.getBean().name}", java.lang.String.class);
String actual = (String) ve.getValue(context);
Assert.assertEquals(BUG53792, actual);
}
use of jakarta.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testBug56797a.
@Test
public void testBug56797a() {
MethodExpression me = factory.createMethodExpression(context, "${beanAA.echo1('Hello World!')}", null, null);
Object r = me.invoke(context, null);
Assert.assertEquals("AA1Hello World!", r.toString());
}
Aggregations