private string RunUpgrade() { string filePath = Path.Combine(this.TestContext.DeploymentDirectory, FILE_NAME); var upgrade = new V401ContentUpgrade(); upgrade.Run(filePath); return(filePath); }
public void TelnetAndSshInFilePersitence_Upgrade_SetsFavoritePropertiesToNewType() { string filePath = Path.Combine(this.TestContext.DeploymentDirectory, FILE_NAME); var upgrade = new V401ContentUpgrade(); upgrade.Run(filePath); string updatedContent = File.ReadAllText(filePath); bool allpass = AllUpgraded(updatedContent); Assert.IsTrue(allpass, MESSAGE); }
public void TelnetAndSshInDatabase_Upgrade_SetsFavoritePropertiesToNewType() { this.InitializeTestLab(); this.InsertIntoFavoritesTable("SshFavorite", SSH_PROPERTIES); this.InsertIntoFavoritesTable("TelnetFavorite", TELNET_PROPERTIES); var upgrade = new V401ContentUpgrade(); //upgrade.Run(filePath); var allProperties = this.CheckDatabase.Database.SqlQuery <string>(ASSERT_QUERY); string joinedProperties = string.Join(string.Empty, allProperties); bool allPass = AllUpgraded(joinedProperties); Assert.IsTrue(allPass, MESSAGE); }
public void TelnetAndSsh_Upgrade_SetsFavoritePropertiesToNewType() { string filePath = Path.Combine(this.TestContext.DeploymentDirectory, FILE_NAME); // TODO Upgrade SQL persistence ssh or telnet favorites to empty PuttyOptions. var upgrade = new V401ContentUpgrade(); upgrade.Run(filePath); string updatedContent = File.ReadAllText(filePath); bool allpass = !updatedContent.Contains("SSHKeyFile") && !updatedContent.Contains("ConsoleOptions") && Regex.Matches(updatedContent, "SshOptions").Count == 2 && Regex.Matches(updatedContent, "TelnetOptions").Count == 2; Assert.IsTrue(allpass, "Both ssh and telnet options types were replaced by PuttyOptions"); }