AppUpdater.Tests.DefaultLocalStructureManagerTests.SetLastValidVersion_KeepsTheVersion C# (CSharp) Method

SetLastValidVersion_KeepsTheVersion() private method

private SetLastValidVersion_KeepsTheVersion ( ) : void
return void
        public void SetLastValidVersion_KeepsTheVersion()
        {
            string data = @"<config><version>1.2.3</version><last_version>3.0.1</last_version></config>";
            string configFilename = Path.Combine(baseDir, "config.xml");
            File.WriteAllText(configFilename, data);

            structureManager.SetLastValidVersion("3.4.5");

            XmlDocument doc = new XmlDocument();
            doc.Load(configFilename);
            var version = doc.SelectSingleNode("config/version");
            Assert.That(version, Is.Not.Null);
            Assert.That(version.InnerText, Is.EqualTo("1.2.3"));
        }