Package javax.el

Examples of javax.el.ELProcessor


    }


    @Test
    public void testSum02() {
        ELProcessor processor = new ELProcessor();

        Object result = processor.getValue(
                "[].stream().sum()",
                Object.class);

        Assert.assertTrue("Result: " + result.toString(),
                ELSupport.equals(Long.valueOf(0), result));
View Full Code Here


    }


    @Test
    public void testCount01() {
        ELProcessor processor = new ELProcessor();

        Object result = processor.getValue(
                "[1,2,3,4,5].stream().count()",
                Object.class);

        Assert.assertTrue("Result: " + result.toString(),
                ELSupport.equals(Long.valueOf(5), result));
View Full Code Here

    }


    @Test
    public void testCount02() {
        ELProcessor processor = new ELProcessor();

        Object result = processor.getValue(
                "[].stream().count()",
                Object.class);

        Assert.assertTrue("Result: " + result.toString(),
                ELSupport.equals(Long.valueOf(0), result));
View Full Code Here

    }


    @Test
    public void testAnyMatch01() {
        ELProcessor processor = new ELProcessor();

        Optional result = (Optional) processor.getValue(
                "[1,2,3,4,5].stream().anyMatch(x->x==7)",
                Object.class);

        Assert.assertEquals(Boolean.FALSE, result.get());
    }
View Full Code Here

    }


    @Test
    public void testAnyMatch02() {
        ELProcessor processor = new ELProcessor();

        Optional result = (Optional) processor.getValue(
                "[1,2,3,4,5].stream().anyMatch(x->x==3)",
                Object.class);

        Assert.assertEquals(Boolean.TRUE, result.get());
    }
View Full Code Here

    }


    @Test(expected=ELException.class)
    public void testAnyMatch03() {
        ELProcessor processor = new ELProcessor();

        Optional result = (Optional) processor.getValue(
                "[].stream().anyMatch(x->x==7)",
                Object.class);

        result.get();
    }
View Full Code Here

    }


    @Test
    public void testAllMatch01() {
        ELProcessor processor = new ELProcessor();

        Optional result = (Optional) processor.getValue(
                "[1,2,3,4,5].stream().allMatch(x->x>3)",
                Object.class);

        Assert.assertEquals(Boolean.FALSE, result.get());
    }
View Full Code Here

    }


    @Test
    public void testAllMatch02() {
        ELProcessor processor = new ELProcessor();

        Optional result = (Optional) processor.getValue(
                "[1,2,3,4,5].stream().allMatch(x->x>0)",
                Object.class);

        Assert.assertEquals(Boolean.TRUE, result.get());
    }
View Full Code Here

    }


    @Test
    public void testAllMatch03() {
        ELProcessor processor = new ELProcessor();

        Optional result = (Optional) processor.getValue(
                "[1,2,3,4,5].stream().allMatch(x->x>10)",
                Object.class);

        Assert.assertEquals(Boolean.FALSE, result.get());
    }
View Full Code Here

                String.valueOf(ELArithmetic.add(a, b)));
    }

    @Test
    public void testAdd02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("null + null");
        Assert.assertEquals(Long.valueOf(0), 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.