public void TestIfWithQuestionMarkNoValueQ() { var IfEval = new ZeroCode2.Interpreter.Evaluator.IfEvaluator("#Parameters.Debug?"); var context = new ZeroCode2.Interpreter.InterpreterContext { Model = ModelCollector }; var res = IfEval.Evaluate(context, ""); Assert.IsTrue(res.Result == ZeroCode2.Interpreter.Evaluator.EvaluationResultValues.False); }
public void TestIfWithQuestionMarkNegativeValueTrue() { var IfEval = new ZeroCode2.Interpreter.Evaluator.IfEvaluator("!#Parameters.debug=off"); var context = new ZeroCode2.Interpreter.InterpreterContext { Model = ModelCollector }; var res = IfEval.Evaluate(context, ""); Assert.IsTrue(res.Value == string.Empty); Assert.IsFalse(res.Result == ZeroCode2.Interpreter.Evaluator.EvaluationResultValues.False); }