Ejemplo n.º 1
0
        public void Expression_Method()
        {
            IOperator op = sql.Op(() => SqlExp.Exists(sql.RawQuery("Subquery")));

            QueryResult result = engine.Compile(op);

            Assert.Equal("EXISTS (Subquery)", result.Sql);
            Assert.Equal(new Dictionary <string, object>(), result.Parameters);
        }
Ejemplo n.º 2
0
        public void Expression_Method_Invalid_Call()
        {
            Exception ex = Assert.Throws <InvalidOperationException>(() => SqlExp.Exists(sql.RawQuery("Subquery")));

            Assert.Equal("Only for expressions.", ex.Message);
        }