コード例 #1
0
            public void IsTrueIfUpdatedAndOptedIn()
            {
                var settings = new ViewSettings { IsUpdated = true, EnableChangelog = true };
                var vm = new UpdateViewModel(settings);

                Assert.True(vm.ShowChangelog);
            }
コード例 #2
0
            public void IsFalseIfUpdatedButOptedOut()
            {
                var settings = new ViewSettings { IsUpdated = true, EnableChangelog = false };
                var vm = new UpdateViewModel(settings);

                Assert.False(vm.ShowChangelog);
            }
コード例 #3
0
            public void IsFalseIfNotUpdated()
            {
                var settings = new ViewSettings { IsUpdated = false };
                var vm = new UpdateViewModel(settings);

                Assert.False(vm.ShowChangelog);
            }
コード例 #4
0
            public void SetsIsUpdatedToFalse()
            {
                var settings = new ViewSettings { IsUpdated = true };
                var vm = new UpdateViewModel(settings);

                vm.ChangelogShown();

                Assert.False(settings.IsUpdated);
            }
コード例 #5
0
            public void DisabledChangelogIfRequested()
            {
                var settings = new ViewSettings { IsUpdated = true, EnableChangelog = true };
                var vm = new UpdateViewModel(settings) { DisableChangelog = true };

                vm.ChangelogShown();

                Assert.False(settings.EnableChangelog);
            }
コード例 #6
0
            public void SetsIsUpdatedToFalse()
            {
                var settings = new ViewSettings { IsUpdated = true };
                using (var vm = new UpdateViewModel(settings))
                {
                    vm.DismissUpdateNotification();
                }

                Assert.False(settings.IsUpdated);
            }