public void ThrowExceptionOnSqlStatementBuilderCreateDeleteAllIfTheTableIsWhitespace() { // Setup var statementBuilder = new SqlStatementBuilder(); var queryBuilder = new QueryBuilder(); var tableName = " "; // Act statementBuilder.CreateDeleteAll(queryBuilder: queryBuilder, tableName: tableName); }
public void TestWithMappings() { // Setup var statementBuilder = new SqlStatementBuilder(); var queryBuilder = new QueryBuilder <TestWithMappingsClass>(); // Act var actual = statementBuilder.CreateDeleteAll(queryBuilder); var expected = $"" + $"DELETE " + $"FROM [ClassName] ;"; // Assert Assert.AreEqual(expected, actual); }
public void TestSqlStatementBuilderCreateDeleteAll() { // Setup var statementBuilder = new SqlStatementBuilder(); var queryBuilder = new QueryBuilder(); var tableName = "Table"; // Act var actual = statementBuilder.CreateDeleteAll(queryBuilder: queryBuilder, tableName: tableName); var expected = "DELETE FROM [Table] ;"; // Assert Assert.AreEqual(expected, actual); }