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

SetCurrentVersion_UpdatesTheConfigFile() private method

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

            structureManager.SetCurrentVersion("3.4.5");

            XmlDocument doc = new XmlDocument();
            doc.Load(configFilename);
            string version = doc.SelectSingleNode("config/version").InnerText;
            Assert.That(version, Is.EqualTo("3.4.5"));
        }