public void ThrowExceptionOnSqlStatementBuilderCreateDeleteIfTheTableIsEmpty() { // Setup var statementBuilder = new SqlServerStatementBuilder(); var queryBuilder = new QueryBuilder(); var tableName = ""; // Act statementBuilder.CreateDelete(queryBuilder: queryBuilder, tableName: tableName); }
public void TestSqlStatementBuilderCreateDeleteWithUnquotedTableSchema() { // Setup var statementBuilder = new SqlServerStatementBuilder(); var queryBuilder = new QueryBuilder(); var tableName = "dbo.Table"; // Act var actual = statementBuilder.CreateDelete(queryBuilder: queryBuilder, tableName: tableName, where : null); var expected = "DELETE FROM [dbo].[Table] ;"; // Assert Assert.AreEqual(expected, actual); }