Package org.apache.commons.jexl2.junit

Examples of org.apache.commons.jexl2.junit.Asserter


    protected void setAttribute(Object object, Object attribute, Object value, JexlNode node) {
        // attempt to reuse last executor cached in volatile JexlNode.value
        if (node != null && cache) {
            Object cached = node.jjtGetValue();
            if (cached instanceof JexlPropertySet) {
                JexlPropertySet setter = (JexlPropertySet) cached;
                Object eval = setter.tryInvoke(object, attribute, value);
                if (!setter.tryFailed(eval)) {
                    return;
                }
            }
        }
        JexlException xjexl = null;
        JexlPropertySet vs = uberspect.getPropertySet(object, attribute, value, node);
        if (vs != null) {
            try {
                // cache executor in volatile JexlNode.value
                vs.invoke(object, value);
                if (node != null && cache && vs.isCacheable()) {
                    node.jjtSetValue(vs);
                }
                return;
            } catch (RuntimeException xrt) {
                if (node == null) {
View Full Code Here


    }

    // JEXL-52: can be implemented by deriving Interpreter.{g,s}etAttribute; later
    public void test52base() throws Exception {
        JexlEngine jexl = new JexlEngine();
        Uberspect uber = jexl.getUberspect();
        // most likely, call will be in an Interpreter, getUberspect
        String[] names = ((Introspector) uber).getMethodNames(Another.class);
        assertTrue("should find methods", names.length > 0);
        int found = 0;
        for (String name : names) {
View Full Code Here

     */
    public static Uberspect getUberspect(Log logger) {
        if (logger == null || logger.equals(LogFactory.getLog(JexlEngine.class))) {
            return UberspectHolder.UBERSPECT;
        }
        return new UberspectImpl(logger);
    }
View Full Code Here

    static final String[][] GET_METHOD_ARRAY2 =
        new String[][] { {"One", "Two", "Three"},{"Four", "Five", "Six"} };

    @Override
    public void setUp() {
        asserter = new Asserter(JEXL);
    }
View Full Code Here

public class ArithmeticTest extends JexlTestCase {
    private Asserter asserter;

    @Override
    public void setUp() {
        asserter = new Asserter(JEXL);
    }
View Full Code Here

        }
    }

    @Override
    public void setUp() {
        asserter = new Asserter(JEXL);
    }
View Full Code Here

    static final String[][] GET_METHOD_ARRAY2 =
        new String[][] { {"One", "Two", "Three"},{"Four", "Five", "Six"} };

    @Override
    public void setUp() {
        asserter = new Asserter(JEXL);
    }
View Full Code Here

public class ArithmeticTest extends JexlTestCase {
    private Asserter asserter;

    @Override
    public void setUp() {
        asserter = new Asserter(JEXL);
    }
View Full Code Here

public class BitwiseOperatorTest extends JexlTestCase {
    private Asserter asserter;

    @Override
    public void setUp() {
        asserter = new Asserter(JEXL);
    }
View Full Code Here

        }
    }

    @Override
    public void setUp() {
        asserter = new Asserter(JEXL);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.jexl2.junit.Asserter

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.