Ejemplo n.º 1
0
            public void Variables_1()
            {
                var query    = new MockQuery(_connection, "SELECT * FROM TABLE1 {WHERE {COLUMN1 [Variable1]}}");
                var variable = "= 'Some Value'";

                query.DefineVariable("Variable1", variable);

                var cmd = query.CreateCommand();

                Assert.IsNotNull(cmd);
                Assert.AreEqual(CommandType.Text, cmd.CommandType);
                Assert.AreEqual($"SELECT * FROM TABLE1 WHERE COLUMN1 {variable}", cmd.CommandText);
            }