Package javax.el

Examples of javax.el.ELProcessor


    }


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

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

        result.get();
    }
View Full Code Here


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

    @Test
    public void testSubtract02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("null - null");
        Assert.assertEquals(Long.valueOf(0), result);
    }
View Full Code Here

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

    @Test
    public void testMultiply02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("null * null");
        Assert.assertEquals(Long.valueOf(0), result);
    }
View Full Code Here

    }


    @Test
    public void testNoneMatch01() {
        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

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

    @Test
    public void testDivide02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("null / null");
        Assert.assertEquals(Long.valueOf(0), result);
    }
View Full Code Here

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

    @Test
    public void testMod02() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("null % null");
        Assert.assertEquals(Long.valueOf(0), result);
    }
View Full Code Here

    }


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

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

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

        Assert.assertEquals(Long.valueOf(0), result);
    }

    @Test
    public void testUnaryMinus01() {
        ELProcessor processor = new ELProcessor();
        Object result = processor.eval("-null");
        Assert.assertEquals(Long.valueOf(0), result);
    }
View Full Code Here

    }


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

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

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

    }


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

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

        result.get();
    }
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.