Examples of JexlArithmetic


Examples of org.apache.commons.jexl2.JexlArithmetic

     */
    public void assertExpression(String expression, Object expected) throws Exception {
        Expression exp = engine.createExpression(expression);
        Object value = exp.evaluate(context);
        if (expected instanceof BigDecimal) {
            JexlArithmetic jexla = engine.getArithmetic();
            assertTrue("expression: " + expression, ((BigDecimal) expected).compareTo(jexla.toBigDecimal(value)) == 0);
        } else {
            assertEquals("expression: " + expression, expected, value);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.