public void ReadTest()
 {
     IUpdateTask actual = new AppcastReader().Read(Data);
     Assert.AreEqual(_expected.Checksum, actual.Checksum);
     Assert.AreEqual(_expected.Description, actual.Description);
     Assert.AreEqual(_expected.FileLength, actual.FileLength);
     Assert.AreEqual(_expected.FileVersion, actual.FileVersion);
     Assert.AreEqual(_expected.RemotePath, actual.RemotePath);
     Assert.AreEqual(_expected.Title, actual.Title);
 }
Beispiel #2
0
 public bool CheckForUpdate(string feedUrl, Version version)
 {
     try
     {
         CurrentSourceUpdate = new WebSource();
         CurrentUpdate = new AppcastReader().Read(CurrentSourceUpdate.GetUpdatesFeed(feedUrl));
         int cpr = CurrentUpdate.FileVersion.CompareTo(version);
         return cpr > 0;
     }
     catch (Exception e)
     {
         MessageBox.Show(@"Une erreur s'est produite lors de la vérification des mises à jours."
             + Environment.NewLine
             + @"Detail de l'erreur :"
             + Environment.NewLine
             + e.Message);
         return false;
     }
 }