Exemplo n.º 1
0
        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);
        }
Exemplo n.º 3
0
        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");
        }