public void IsNewVersionAvailable(String currentVersion, String availableVersion, bool isNewVersionAvailable)
 {
     ApplicationUpdateInfo applicationUpdateInfo = new ApplicationUpdateInfo() {
         Version = availableVersion,
         DownloadUrl = "https://mydomain.com",
         DownloadPage = "https://mydomain.com",
         FileHash = "d41d8cd98f00b204e9800998ecf8427e"
     };
     Assert.AreEqual(isNewVersionAvailable, applicationUpdateInfo.IsNewVersionAvailable(new Version(currentVersion)));
 }
 private static ApplicationUpdateInfo internalLoad(XmlDocument xmlDocument)
 {
     XmlNode xmlNode = xmlDocument.SelectSingleNode("/update");
     ApplicationUpdateInfo applicationUpdateInfo = new ApplicationUpdateInfo();
     applicationUpdateInfo.Version = xmlNode.SelectSingleNode("version").InnerText;
     applicationUpdateInfo.DownloadUrl = xmlNode.SelectSingleNode("downloadUrl").InnerText;
     applicationUpdateInfo.DownloadPage = xmlNode.SelectSingleNode("downloadPage").InnerText;
     applicationUpdateInfo.FileHash = xmlNode.SelectSingleNode("fileHash").InnerText;
     return applicationUpdateInfo;
 }
 public void SaveAndLoadFromXmlFile()
 {
     ApplicationUpdateInfo applicationUpdateInfo = new ApplicationUpdateInfo() {
         Version = "0.1.2",
         DownloadUrl = "https://mydomain.com/uRADMonitor.exe",
         DownloadPage = "https://mydomain.com/Update.html",
         FileHash = "d41d8cd98f00b204e9800998ecf8427e"
     };
     applicationUpdateInfo.Save(outputfilePath);
     Assert.IsTrue(File.Exists(outputfilePath));
     applicationUpdateInfo = ApplicationUpdateInfo.LoadFromXmlFile(outputfilePath);
     Assert.AreEqual("0.1.2", applicationUpdateInfo.Version);
     Assert.AreEqual("https://mydomain.com/uRADMonitor.exe", applicationUpdateInfo.DownloadUrl);
     Assert.AreEqual("https://mydomain.com/Update.html", applicationUpdateInfo.DownloadPage);
     Assert.AreEqual("d41d8cd98f00b204e9800998ecf8427e", applicationUpdateInfo.FileHash);
 }