Beispiel #1
0
        public void DontShowSettingsAndNewVersion()
        {
            Settings.Default.ShowOnStartup = false;
            TestVersionService versionService = new TestVersionService(new Version(0, 5), new Version(0, 5));

            new MainViewModel(_visualizerService, _window, new TestMessageBoxService(), new RealHartCommunicationLite(), versionService);

            _window.SimulateViewIsLoadedEvent();
            versionService.ReleaseOnlineVersion();

            _settingWasCalled.Should().BeFalse();
            _updateWasCalled.Should().BeFalse();
        }
Beispiel #2
0
        public void ShowSettingsButDontShowNewVersion()
        {
            _visualizerService.ShowDialogResultResponders.Enqueue(() => _settingWasCalled = true);

            Settings.Default.ShowOnStartup = true;
            TestVersionService versionService = new TestVersionService(new Version(0, 5), new Version(0, 5));

            new MainViewModel(_visualizerService, _window, new TestMessageBoxService(), new RealHartCommunicationLite(), versionService);

            _window.SimulateViewIsLoadedEvent();
            versionService.ReleaseOnlineVersion();

            _settingWasCalled.Should().BeTrue();
            _updateWasCalled.Should().BeFalse();
        }