示例#1
0
        public void ThrowExceptionOnSqlStatementBuilderCreateDeleteIfTheTableIsEmpty()
        {
            // Setup
            var statementBuilder = new SqlServerStatementBuilder();
            var queryBuilder     = new QueryBuilder();
            var tableName        = "";

            // Act
            statementBuilder.CreateDelete(queryBuilder: queryBuilder,
                                          tableName: tableName);
        }
示例#2
0
        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);
        }