Esempio n. 1
0
        public void ThrowExceptionOnSqlStatementBuilderCreateTruncateIfTheTableIsWhitespace()
        {
            // Setup
            var statementBuilder = new SqlServerStatementBuilder();
            var queryBuilder     = new QueryBuilder();
            var tableName        = " ";

            // Act
            statementBuilder.CreateTruncate(queryBuilder: queryBuilder,
                                            tableName: tableName);
        }
Esempio n. 2
0
        public void TestSqlStatementBuilderCreateTruncateWithUnquotedTableSchema()
        {
            // Setup
            var statementBuilder = new SqlServerStatementBuilder();
            var queryBuilder     = new QueryBuilder();
            var tableName        = "dbo.Table";

            // Act
            var actual = statementBuilder.CreateTruncate(queryBuilder: queryBuilder,
                                                         tableName: tableName);
            var expected = "TRUNCATE TABLE [dbo].[Table] ;";

            // Assert
            Assert.AreEqual(expected, actual);
        }