public override void Verify(CommandCall commandCall, IEvaluator evaluator, IResultRecorder resultRecorder) { CommandCallList childCommands = commandCall.Children; childCommands.SetUp(evaluator, resultRecorder); childCommands.Execute(evaluator, resultRecorder); childCommands.Verify(evaluator, resultRecorder); String expression = commandCall.Expression; Object result = evaluator.Evaluate(expression); if (result != null && result is Boolean) { if ((Boolean)result) { ProcessTrueResult(commandCall, resultRecorder); } else { ProcessFalseResult(commandCall, resultRecorder); } } else { throw new InvalidExpressionException("Expression '" + expression + "' did not produce a boolean result (needed for assertTrue)."); } }
public void Execute(CommandCall commandCall, global::Concordion.Api.IEvaluator evaluator, global::Concordion.Api.IResultRecorder resultRecorder) { CommandCallList childCommands = commandCall.Children; childCommands.SetUp(evaluator, resultRecorder); evaluator.Evaluate(commandCall.Expression); childCommands.Execute(evaluator, resultRecorder); childCommands.Verify(evaluator, resultRecorder); }