use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstListData method testGetType.
@Test
public void testGetType() {
ELProcessor processor = new ELProcessor();
ELContext context = processor.getELManager().getELContext();
ExpressionFactory factory = ELManager.getExpressionFactory();
ValueExpression ve = factory.createValueExpression(context, "${['a','b','c','b','c']}", List.class);
Assert.assertEquals(List.class, ve.getType(context));
Assert.assertEquals(simpleList, ve.getValue(context));
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstListData method testNested01.
@Test
public void testNested01() {
ELProcessor processor = new ELProcessor();
Object result = processor.getValue("[['a','b','c','b','c'],[],'d']", List.class);
Assert.assertEquals(nestedList, result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstAnd method test03.
@Test
public void test03() {
ELProcessor processor = new ELProcessor();
Boolean result = processor.eval("null && true");
Assert.assertEquals(Boolean.FALSE, result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstAnd method test01.
@Test
public void test01() {
ELProcessor processor = new ELProcessor();
Boolean result = processor.eval("true && true");
Assert.assertEquals(Boolean.TRUE, result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstLambdaExpression method testSpec03.
@Test
public void testSpec03() {
ELProcessor processor = new ELProcessor();
Object result = processor.getValue("(()->64)", Integer.class);
Assert.assertEquals(Integer.valueOf(64), result);
}
Aggregations