Package javax.el

Examples of javax.el.ELProcessor


        Assert.assertEquals(Boolean.FALSE, result);
    }

    @Test
    public void test03() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("!false");
        Assert.assertEquals(Boolean.TRUE, result);
    }
View Full Code Here


    }


    @Test
    public void testSimple01() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue(
                "['a','b','c', 'b', 'c']", List.class);
        Assert.assertEquals(simpleList, result);
    }
View Full Code Here

    }


    @Test
    public void testSimple02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue("[]", List.class);
        Assert.assertEquals(Collections.EMPTY_LIST, result);
    }
View Full Code Here

    }


    @Test
    public void testNested01() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue(
                "[['a','b','c','b','c'],[],'d']", List.class);
        Assert.assertEquals(nestedList, result);
    }
View Full Code Here

    }


    @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);
View Full Code Here

    }


    @Test
    public void testSimple01() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue(
                "{'a':'1','b':'2','c':'3'}", Map.class);
        Assert.assertEquals(simpleMap, result);
    }
View Full Code Here

    }


    @Test
    public void testSimple02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue("{}", Map.class);
        Assert.assertEquals(Collections.EMPTY_MAP, result);
    }
View Full Code Here

    }


    @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);
    }
View Full Code Here

public class TestAstSemicolon {

    @Test
    public void testGetValue01() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue("1;2", String.class);
        Assert.assertEquals("2", result);
    }
View Full Code Here

    }


    @Test
    public void testGetValue02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue("1;2", Integer.class);
        Assert.assertEquals(Integer.valueOf(2), result);
    }
View Full Code Here

TOP

Related Classes of javax.el.ELProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.