public void TestNoUpdateIfNoUpdateData()
        {
            data.HasUpdateServerData.Returns(false);

            var updateService = new UpdateService(data, clientFactory, applicationVersion, application, fileSystem,
                                                  standaloneUpdate, settings, platformService);

            Assert.IsFalse(updateService.CanCheckForUpdates());
        }
Example #2
0
        public void TestNoUpdateIfNoVersion()
        {
            applicationVersion.VersionKnown.Returns(false);

            var updateService = new UpdateService(data, clientFactory, applicationVersion, application, fileSystem,
                                                  standaloneUpdate, settings, platformService, updateVerifier);

            Assert.IsFalse(updateService.CanCheckForUpdates());
        }
        public void TestCanCheckForUpdatesIfHaveData()
        {
            applicationVersion.VersionKnown.Returns(true);
            data.HasUpdateServerData.Returns(true);

            var updateService = new UpdateService(data, clientFactory, applicationVersion, application, fileSystem,
                                                  standaloneUpdate, settings, platformService);

            Assert.IsTrue(updateService.CanCheckForUpdates());
        }