Ejemplo n.º 1
0
        public void InterpreteScript6Test()
        {
            var log = new BdoLog();

            var scriptVariableSet = BdoScript.CreateVariableSet();
            var resultScript      = GlobalVariables.Scope.Interpreter.Evaluate <string>(
                _script6, default, scriptVariableSet, log)?.ToString();
Ejemplo n.º 2
0
        public void InterpreteScript1Test()
        {
            var log = new BdoLog();

            var scriptVariableSet = BdoScript.CreateVariableSet();
            var resultScript      = GlobalVariables.Scope.Interpreter.Evaluate <bool?>(_script1, DataExpressionKind.Script, scriptVariableSet, log)?.ToString();

            string xml = string.Empty;

            if (log.HasErrorsOrExceptions())
            {
                xml = ". Result was '" + log.ToXml() + "'";
            }
            Assert.That(_interpretedScript1.Equals(resultScript, StringComparison.OrdinalIgnoreCase), "Bad script interpretation" + xml);
        }
Ejemplo n.º 3
0
        public void InterpreteScriptNullTest()
        {
            var log = new BdoLog();

            var scriptVariableSet = BdoScript.CreateVariableSet();
            var resultScript      = GlobalVariables.Scope.Interpreter.Evaluate <bool?>(null as DataExpression, scriptVariableSet, log)?.ToString();

            string xml = string.Empty;

            if (log.HasErrorsOrExceptions())
            {
                xml = ". Result was '" + log.ToXml() + "'";
            }
            Assert.That(resultScript == null, "Bad script interpretation" + xml);
        }