public void ThrowExceptionOnSqlStatementBuilderCreateCountAllIfTheTableIsEmpty() { // Setup var statementBuilder = new SqlStatementBuilder(); var queryBuilder = new QueryBuilder(); var tableName = ""; // Act statementBuilder.CreateCountAll(queryBuilder: queryBuilder, tableName: tableName, hints: null); }
public void TestSqlStatementBuilderCreateCountAll() { // Setup var statementBuilder = new SqlStatementBuilder(); var queryBuilder = new QueryBuilder(); var tableName = "Table"; // Act var actual = statementBuilder.CreateCountAll(queryBuilder: queryBuilder, tableName: tableName, hints: null); var expected = "SELECT COUNT_BIG (1) AS [Counted] FROM [Table] ;"; // Assert Assert.AreEqual(expected, actual); }