Beispiel #1
0
        public void TestSqlStringConcat()
        {
            var expression = DbFluent.StringConcat("X", "O", "A");
            var log        = new BdoLog();

            string expectedResult = @"'X' || 'O' || 'A'";

            var result = _appHost.Interpreter.Evaluate <string>(
                expression,
                new ScriptVariableSet().SetDbBuilder(new DbQueryBuilder_PostgreSql()),
                log: log);

            var xml = "";

            if (log.HasErrorsOrExceptions())
            {
                xml = ". Result was '" + log.ToXml();
            }
            Assert.That(result.Trim().Equals(expectedResult.Trim(), StringComparison.OrdinalIgnoreCase), "Bad script interpretation" + xml);
        }