Beispiel #1
0
        public void TestDbConnectionStatementBuilderForDeleteAll()
        {
            // Prepare
            var statementBuilder = new Mock <IStatementBuilder>();
            var connection       = new CustomDbConnection();

            // Setup
            statementBuilder.Setup(builder =>
                                   builder.CreateDeleteAll <DataEntity>(
                                       It.IsAny <QueryBuilder <DataEntity> >()));

            // Act
            connection.DeleteAll <DataEntity>(statementBuilder: statementBuilder.Object);

            // Assert
            statementBuilder.Verify(builder =>
                                    builder.CreateDeleteAll <DataEntity>(
                                        It.IsAny <QueryBuilder <DataEntity> >()), Times.Once);
        }