public void Formatted() { SqlAssert.Formatted(TestStatement, "WHERE", " [u].Id = @id", ""); }
public void Formatted() { SqlAssert.Formatted(TestStatement, "FROM", " Users AS [u]", "" ); }
public void Formatted() { var join = Join.Inner("Persons").As("p").On("p.ID = u.Person"); SqlAssert.Formatted(join, "INNER JOIN", " Persons AS p ON p.ID = u.Person", ""); }
public void NOT_Formatted() { var statement = Logical.Not("[dbo].[Column] = 17"); SqlAssert.Formatted(statement, "NOT(", " [dbo].[Column] = 17", ")", ""); }
public void And_2Argument_Formatted() { var statement = Logical.And("[dbo].[Column] = 17", "[dbo].[Id] <> 666"); SqlAssert.Formatted(statement, "(", " [dbo].[Column] = 17 AND", " [dbo].[Id] <> 666", ")", ""); }
public void Ctor_SupportsDifferentTypes() { var clause = new JoinClause( "INNER JOIN Users AS u ON u.Person = p.ID", Join.Left("Address").As("a").On("a.Id = p.Address")); SqlAssert.Formatted(clause, "INNER JOIN Users AS u ON u.Person = p.ID", "LEFT JOIN", " Address AS a ON a.Id = p.Address", ""); }