public void TestQueryNewestVersion() { var actionCenter = new Mock <IActionCenter>(); var updater = new Tailviewer.BusinessLogic.AutoUpdates.AutoUpdater(actionCenter.Object, new AutoUpdateSettings { CheckForUpdates = false }); var newestVersion = updater.QueryNewestVersions(); newestVersion.Should().NotBeNull("because we should be able to retrieve the latest version"); }
public void TestDownloadNewestVersion() { var actionCenter = new Mock <IActionCenter>(); var updater = new Tailviewer.BusinessLogic.AutoUpdates.AutoUpdater(actionCenter.Object, new AutoUpdateSettings { CheckForUpdates = false }); var newestVersion = updater.QueryNewestVersions(); new Action(() => updater.Download(newestVersion.Stable, newestVersion.StableAddress)) .Should().NotThrow(); }