public void Initialize() { var dbSafe = PgDbSafeManager.Initialize("specflow-helpers-demo.xml"); dbSafe.PassConnectionString(_connectionString); dbSafe.ExecuteScripts("delete-data") .ExecuteScripts("reseed-tables"); _dbSafe = dbSafe; }
public void Initialize() { _target = new ProductDb(new FakeTimeService()); _target.Log = TestContext.WriteLine; _dbSafe = PgDbSafeManager.Initialize("product-db-test.xml") .SetConnectionString("ProductEntities-Test-Framework") .ExecuteScripts("delete-products", "delete-categories", "delete-suppliers", "reseed-product-table") .LoadTables("categories", "suppliers", "products") .RegisterFormatter(typeof(DateTime), new DateTimeFormatter("yyyy-MM-dd HH:mm:ss")) .RegisterFormatter("release_date", new DateTimeFormatter("yyyy-MM-dd")) .RegisterFormatter(typeof(decimal), new DecimalFormatter("0.00")); Console.WriteLine($"IsGlobalConfig: {_dbSafe.Config.IsGlobalConfig}, SerializeTests: {_dbSafe.Config.SerializeTests}"); }