public void Ceiling() { Person person = new Person(); Exception ex = Assert.Throws <InvalidOperationException>(() => SqlExp.Ceiling(person.Salary)); Assert.Equal("Only for expressions.", ex.Message); }
public void Ceiling() { Person person = null; IFunction func = (IFunction)sql.Val(() => SqlExp.Ceiling(person.Salary)); QueryResult result = engine.Compile(func); Assert.Equal("CEILING(`person`.`Salary`)", result.Sql); Assert.Equal(new Dictionary <string, object>(), result.Parameters); }