Example #1
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (!_disposedValue)
     {
         DatabaseFixture.DropTable(LogTriggerTableName);
         _disposedValue = true;
     }
 }
        public void TestAuditOptionsDisableTriggersOnLogTable_ThrowsNotSupportedException()
        {
            // arrange
            var options = new ColumnOptions {
                DisableTriggers = true
            };
            var loggerConfiguration = new LoggerConfiguration();

            Assert.Throws <NotSupportedException>(() => loggerConfiguration.AuditTo.MSSqlServer(
                                                      connectionString: DatabaseFixture.LogEventsConnectionString,
                                                      tableName: DatabaseFixture.LogTableName,
                                                      autoCreateSqlTable: true,
                                                      columnOptions: options)
                                                  .CreateLogger());

            // throws, should be no table to delete unless the test fails
            DatabaseFixture.DropTable();
        }
Example #3
0
 public void Dispose()
 {
     DatabaseFixture.DropTable();
 }
 public void Dispose()
 {
     DatabaseFixture.DropTable();
     DatabaseFixture.DropTable(logTriggerTableName);
 }