use of javax.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testInvokeWithSuperAAAB.
@Test
public void testInvokeWithSuperAAAB() {
MethodExpression me11 = factory.createMethodExpression(context, "${beanC.sayHello(beanAAA,beanB)}", null, null);
Object r11 = me11.invoke(context, null);
assertEquals("AAB: Hello AAA from B", r11.toString());
}
use of javax.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);
assertEquals("ABB: Hello A from BBB", r7.toString());
}
use of javax.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testInvokeWithVarArgsAAB.
@Test
public void testInvokeWithVarArgsAAB() throws Exception {
MethodExpression me4 = factory.createMethodExpression(context, "${beanC.sayHello(beanAA,beanB,beanB)}", null, null);
Exception e = null;
try {
me4.invoke(context, null);
} catch (Exception e1) {
e = e1;
}
// Expected to fail
assertNotNull(e);
}
use of javax.el.MethodExpression in project tomcat by apache.
the class TestMethodExpressionImpl method testInvokeWithSuperAAABBB.
@Test
public void testInvokeWithSuperAAABBB() {
MethodExpression me13 = factory.createMethodExpression(context, "${beanC.sayHello(beanAAA,beanBBB)}", null, null);
Exception e = null;
try {
me13.invoke(context, null);
} catch (Exception e1) {
e = e1;
}
// Expected to fail
assertNotNull(e);
}
use of javax.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);
assertEquals("Hello Tomcat from B", actual);
}
Aggregations