Package org.apache.hivemind.conditional

Examples of org.apache.hivemind.conditional.Evaluator


{
    public void testConstructorAndGetters()
    {
        Node left = (Node) newMock(Node.class);
        Node right = (Node) newMock(Node.class);
        Evaluator evaluator = (Evaluator) newMock(Evaluator.class);

        replayControls();

        Node n = new NodeImpl(left, right, evaluator);
View Full Code Here


    }

    public void testEvaluate()
    {
        MockControl control = newControl(Evaluator.class);
        Evaluator evaluator = (Evaluator) control.getMock();
        EvaluationContext context = (EvaluationContext) newMock(EvaluationContext.class);

        Node n = new NodeImpl(evaluator);

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

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

        replayControls();

        assertEquals(false, n.evaluate(context));
View Full Code Here

{
    public void testConstructorAndGetters()
    {
        Node left = (Node) newMock(Node.class);
        Node right = (Node) newMock(Node.class);
        Evaluator evaluator = (Evaluator) newMock(Evaluator.class);

        replayControls();

        Node n = new NodeImpl(left, right, evaluator);
View Full Code Here

    }

    public void testEvaluate()
    {
        MockControl control = newControl(Evaluator.class);
        Evaluator evaluator = (Evaluator) control.getMock();
        EvaluationContext context = (EvaluationContext) newMock(EvaluationContext.class);

        Node n = new NodeImpl(evaluator);

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

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

        replayControls();

        assertEquals(false, n.evaluate(context));
View Full Code Here

TOP

Related Classes of org.apache.hivemind.conditional.Evaluator

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.