예제 #1
0
        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);
        }
예제 #2
0
        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);
        }