public void Initialize() { _dbSafe = SqlDbSafeManager.Initialize("product-db-test.xml") .SetConnectionString("ProductEntities-Test-Framework") .ExecuteScripts("delete-products", "delete-categories", "delete-suppliers", "reseed-product-table") .LoadTables("categories", "suppliers", "products"); }
public void Initialize(DbSafeManagerConfig dbsafeConfig) { _dbSafe = SqlDbSafeManager.Initialize(dbsafeConfig, "product-db-test.xml") .SetConnectionString("ProductEntities-Test-Framework"); Console.WriteLine($"IsGlobalConfig: {_dbSafe.Config.IsGlobalConfig}, SerializeTests: {_dbSafe.Config.SerializeTests}, ReuseConnection: {_dbSafe.Config.ReuseConnection}"); }
public void Initialize() { var dbSafe = SqlDbSafeManager.Initialize("specflow-helpers-demo.xml"); dbSafe.PassConnectionString(_connectionString); dbSafe.ExecuteScripts("delete-data") .ExecuteScripts("reseed-tables"); _dbSafe = dbSafe; }
public void Initialize() { _target = new ProductDb { Log = TestContext.WriteLine }; _dbSafe = SqlDbSafeManager.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("ReleaseDate", new DateTimeFormatter("yyyy-MM-dd")) .RegisterFormatter(typeof(decimal), new DecimalFormatter("0.00")); Console.WriteLine($"IsGlobalConfig: {_dbSafe.Config.IsGlobalConfig}, SerializeTests: {_dbSafe.Config.SerializeTests}, ReuseConnection: {_dbSafe.Config.ReuseConnection}"); }