Exemplo n.º 1
0
        public void ThrowExceptionOnSqlStatementBuilderCreateCountAllIfTheTableIsEmpty()
        {
            // Setup
            var statementBuilder = new SqlStatementBuilder();
            var queryBuilder     = new QueryBuilder();
            var tableName        = "";

            // Act
            statementBuilder.CreateCountAll(queryBuilder: queryBuilder,
                                            tableName: tableName,
                                            hints: null);
        }
Exemplo n.º 2
0
        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);
        }