public void Setup() { ConfigFileManager.CopyWebConfig(); ConfigFileManager.CopyConnectionStringsConfig(); ConfigFileManager.CopyRoadkillConfig(); SqlExpressSetup.RecreateLocalDbData(); }
public void Setup() { SqlExpressSetup.RecreateLocalDbData(); string sqlFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Integration", "Import", "screwturn3.sql"); string sqlCommands = File.ReadAllText(sqlFile); using (SqlConnection connection = new SqlConnection(_connectionString)) { connection.Open(); using (SqlCommand command = connection.CreateCommand()) { command.CommandText = sqlCommands; command.ExecuteNonQuery(); } } }
public void TearDown() { Console.WriteLine("~~~~~~~~~~~~ Installer acceptance tests teardown ~~~~~~~~~~~~"); string sitePath = Settings.WEB_PATH; try { // Remove any attachment folders used by the installer tests string installerTestsAttachmentsPath = Path.Combine(sitePath, "AcceptanceTests"); Directory.Delete(installerTestsAttachmentsPath, true); Console.WriteLine("Deleted temp attachment folders for installer tests"); } catch { } // Reset the db and web.config back for all other acceptance tests SqlExpressSetup.RecreateLocalDbData(); ConfigFileManager.CopyConnectionStringsConfig(); Console.WriteLine("Copied databases and web.config back for installer tests"); Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); }
public void Setup() { string url = ConfigurationManager.AppSettings["url"]; if (string.IsNullOrEmpty(url)) { url = "http://localhost:9876"; } Console.WriteLine("============ Acceptance tests setup ============"); SqlExpressSetup.RecreateLocalDbData(); ConfigFileManager.CopyRoadkillConfig(); BaseUrl = url; LoginUrl = BaseUrl + "/user/login"; LogoutUrl = BaseUrl + "/user/logout"; Driver = AcceptanceTestsSetup.Driver; IsWindowsAuthTests = (ConfigurationManager.AppSettings["useWindowsAuth"] == "true"); Console.WriteLine("================================================="); }
public void TestFixtureSetup() { SqlExpressSetup.RecreateLocalDbData(); }