383384385386387388389390391392393
try { Node node = _conditionalExpressionParser.parse(expression); return node.evaluate(new EvaluationContextImpl(module.getClassResolver())); } catch (RuntimeException ex) { _errorHandler.error(_log, ex.getMessage(), location, ex);
705706707708709710711712713714715
5960616263646566676869
evaluator.evaluate(context, n); control.setReturnValue(true); replayControls(); assertEquals(false, n.evaluate(context)); assertEquals(true, n.evaluate(context)); verifyControls(); } }
60616263646566676869
control.setReturnValue(true); replayControls(); assertEquals(false, n.evaluate(context)); assertEquals(true, n.evaluate(context)); verifyControls(); } }
714715716717718719720721722723724
4142434445464748495051
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; }
96979899100101102103104105106
Node node = new NodeImpl(left, null, new NotEvaluator()); replayControls(); assertEquals(false, node.evaluate(context)); verifyControls(); } public void testAndEvaluatorTrue()
111112113114115116117118119120121
Node node = new NodeImpl(left, right, new AndEvaluator()); replayControls(); assertEquals(true, node.evaluate(context)); verifyControls(); } public void testAndEvaluatorShortcicuit()