protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); ContainerConfig.Configure(); #if DEBUG var dbInitializer = new TestDatabaseInitializer(new CustomerSeed(), new TransactionSeed()); dbInitializer.InitializeDatabase(new DatabaseContext()); #endif }
public void InitializeTests() { if (!testsInitialized) { var dbInitializer = new TestDatabaseInitializer(CustomerSeed, TransactionSeed); dbInitializer.InitializeDatabase(DbContext); testsInitialized = true; testCustomer1.CustomerId = 9999; testCustomer1.CustomerEmail = "*****@*****.**"; testCustomer1.CustomerName = "Mr Customer"; testCustomer1.MobileNo = 1111122222; testCustomer1.TransactionIds = "999,888"; testTransaction1.CurrencyCode = "SEK"; testTransaction1.TransactionDateTime = testDate; testTransaction1.Amount = 999.50; testTransaction1.Status = TransactionStatus.Success; testTransaction1.TransactionId = 999; testTransaction2.CurrencyCode = "GBP"; testTransaction2.TransactionDateTime = testDate; testTransaction2.Amount = 48.20; testTransaction2.Status = TransactionStatus.Success; testTransaction2.TransactionId = 888; } }