Package javax.el

Examples of javax.el.ELProcessor


    /**
     * Test operator precedence (+ before +=).
     */
    @Test
    public void testPrecedence02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue("1 += 2 + 3", String.class);
        Assert.assertEquals("15", result);
    }
View Full Code Here


    /**
     * Test operator precedence (+= before >).
     */
    @Test
    public void testPrecedence03() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue("10 > 2 += 3", String.class);
        Assert.assertEquals("false", result);
    }
View Full Code Here

    /**
     * Test operator precedence (+= before >).
     */
    @Test
    public void testPrecedence04() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.getValue("1 += 2 > 3", String.class);
        Assert.assertEquals("true", result);
    }
View Full Code Here

        Assert.assertEquals("true", result);
    }

    @Test
    public void testGetType() {
        ELProcessor processor = new ELProcessor();
        ELContext context = processor.getELManager().getELContext();
        ExpressionFactory factory = ELManager.getExpressionFactory();

        ValueExpression ve = factory.createValueExpression(
                context, "${'a' += 3}", String.class);
View Full Code Here

public class TestAstAnd {

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

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

    @Test
    public void test02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("true && null");
        Assert.assertEquals(Boolean.FALSE, result);
    }
View Full Code Here

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

    @Test
    public void test03() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("null && true");
        Assert.assertEquals(Boolean.FALSE, result);
    }
View Full Code Here

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

    @Test
    public void test04() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("null && null");
        Assert.assertEquals(Boolean.FALSE, result);
    }
View Full Code Here

public class TestAstNot {

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

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

    @Test
    public void test02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("!true");
        Assert.assertEquals(Boolean.FALSE, 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.