static void Main(string[] args) { var connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; _databaseCleaner = new DatabaseCleaner(connectionString); _dataCounter = new DataCounter(connectionString); var useCases = new UseCase[] { new Transaction(connectionString), new NoTransaction(connectionString) }; foreach (var useCase in useCases) { Console.WriteLine(useCase.GetType().Name); Console.WriteLine(); RunCase(nameof(UseCase.Right), () => useCase.Right()); RunCase(nameof(UseCase.Wrong1), () => useCase.Wrong1()); RunCase(nameof(UseCase.Wrong2), () => useCase.Wrong2()); Console.WriteLine("----------"); Console.WriteLine(); } }
public void IntegratedBeforeEachTestFixture() { DatabaseCleaner = App.Container.GetInstance <IDatabaseCleaner>(); DatabaseMigrator = App.Container.GetInstance <IDatabaseMigrator>(); App.Log.Info("Running Database Migration"); DatabaseMigrator.UpdateSchema(); }