Package org.apache.hivemind.conditional

Examples of org.apache.hivemind.conditional.Node.evaluate()


        try
        {
            Node node = _conditionalExpressionParser.parse(expression);

            return node.evaluate(new EvaluationContextImpl(module.getClassResolver()));
        }
        catch (RuntimeException ex)
        {
            _errorHandler.error(_log, ex.getMessage(), location, ex);
View Full Code Here


        try
        {
            Node node = _conditionalExpressionParser.parse(expression);

            return node.evaluate(new EvaluationContextImpl(module.getClassResolver()));
        }
        catch (RuntimeException ex)
        {
            _errorHandler.error(_log, ex.getMessage(), location, ex);
View Full Code Here

        try
        {
            Node node = _conditionalExpressionParser.parse(expression);

            return node.evaluate(new EvaluationContextImpl(module.getClassResolver()));
        }
        catch (RuntimeException ex)
        {
            _errorHandler.error(_log, ex.getMessage(), location, ex);
View Full Code Here

        evaluator.evaluate(context, n);
        control.setReturnValue(true);

        replayControls();

        assertEquals(false, n.evaluate(context));
        assertEquals(true, n.evaluate(context));

        verifyControls();
    }
}
View Full Code Here

        control.setReturnValue(true);

        replayControls();

        assertEquals(false, n.evaluate(context));
        assertEquals(true, n.evaluate(context));

        verifyControls();
    }
}
View Full Code Here

        try
        {
            Node node = _conditionalExpressionParser.parse(expression);

            return node.evaluate(new EvaluationContextImpl(module.getClassResolver()));
        }
        catch (RuntimeException ex)
        {
            _errorHandler.error(_log, ex.getMessage(), location, ex);
View Full Code Here

        try
        {
            Node node = _conditionalExpressionParser.parse(expression);

            return node.evaluate(new EvaluationContextImpl(module.getClassResolver()));
        }
        catch (RuntimeException ex)
        {
            _errorHandler.error(_log, ex.getMessage(), location, ex);
View Full Code Here

    private Node newNode(EvaluationContext context, boolean value)
    {
        MockControl control = newControl(Node.class);
        Node node = (Node) control.getMock();

        node.evaluate(context);

        control.setReturnValue(value);

        return node;
    }
View Full Code Here

        Node node = new NodeImpl(left, null, new NotEvaluator());

        replayControls();

        assertEquals(false, node.evaluate(context));

        verifyControls();
    }

    public void testAndEvaluatorTrue()
View Full Code Here

        Node node = new NodeImpl(left, right, new AndEvaluator());

        replayControls();

        assertEquals(true, node.evaluate(context));

        verifyControls();
    }

    public void testAndEvaluatorShortcicuit()
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.