use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstOr 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 TestAstOr method test03.
@Test
public void test03() {
ELProcessor processor = new ELProcessor();
Boolean result = processor.eval("null || true");
Assert.assertEquals(Boolean.TRUE, result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstOr method test02.
@Test
public void test02() {
ELProcessor processor = new ELProcessor();
Boolean result = processor.eval("true || null");
Assert.assertEquals(Boolean.TRUE, result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstOr method test04.
@Test
public void test04() {
ELProcessor processor = new ELProcessor();
Boolean result = processor.eval("null || null");
Assert.assertEquals(Boolean.FALSE, result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstSetData 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'}}", Set.class);
Assert.assertEquals(Set.class, ve.getType(context));
Assert.assertEquals(simpleSet, ve.getValue(context));
}
Aggregations