public void Should_detect_pending_update() { _autoUpdate.UpdateSettings.UpdatePath = new Uri(_webServer.Uri, "update-file-1.1.0.0.xml"); _autoUpdate.UpdateSettings.CurrentVersion = new Version("1.0.0.0"); var result = _autoUpdate.IsUpdatePending(); Assert.That(result, Is.True); }
private void CheckUpdates_Click(object sender, RoutedEventArgs e) { ThreadPool.QueueUserWorkItem((state) => { _updatePending = _autoUpdate.IsUpdatePending(); Dispatcher.BeginInvoke(new Action(() => { if (_updatePending) { MessageBox.Show("Found pending updates!"); PendingUpdates = _autoUpdate.PendingUpdates; } else { MessageBox.Show("No updates pending. Is the TestWebServer running?"); } })); }); }