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