use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstMapData method testNested01.
@Test
public void testNested01() {
ELProcessor processor = new ELProcessor();
Object result = processor.getValue("{'simple':{'a':'1','b':'2','c':'3'}," + "'empty':{}," + "'d':'4'}", Map.class);
Assert.assertEquals(nestedMap, result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstMapData method testSimple02.
@Test
public void testSimple02() {
ELProcessor processor = new ELProcessor();
Object result = processor.getValue("{}", Map.class);
Assert.assertEquals(Collections.EMPTY_MAP, result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstMapData 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':'1','b':'2','c':'3'}}", Map.class);
Assert.assertEquals(Map.class, ve.getType(context));
Assert.assertEquals(simpleMap, ve.getValue(context));
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstMapData method testSimple01.
@Test
public void testSimple01() {
ELProcessor processor = new ELProcessor();
Object result = processor.getValue("{'a':'1','b':'2','c':'3'}", Map.class);
Assert.assertEquals(simpleMap, result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstSetData method testSimple02.
@Test
public void testSimple02() {
ELProcessor processor = new ELProcessor();
Object result = processor.getValue("{}", Set.class);
Assert.assertEquals(Collections.EMPTY_SET, result);
}
Aggregations