public void TestConditionWhereIn() { var sqlRaw = "select * from test"; var nsql = new NSQLQuery(sqlRaw); nsql.WhereIn("coluna1", "2,3,4"); var expected = "select * from test WHERE coluna1 IN (2,3,4)"; Assert.AreEqual(expected, nsql.ToSql(), true); }
public void TestConditionWhereInArrayString() { var sqlRaw = "select * from test"; var nsql = new NSQLQuery(sqlRaw); var valores = new List <Object>() { "teste", "teste2" }; nsql.WhereIn("coluna1", valores); var expected = "select * from test WHERE coluna1 IN ('teste','teste2')"; Assert.AreEqual(expected, nsql.ToSql(), true); }