示例#1
0
        public void ShowRecentUsageCanBeStoredAndRead()
        {
            // Arrange

            const bool showRecentUsage = true;
            var        repository      = new StoredSettingsRepository();

            // Act

            repository.SetShowRecentUsage(showRecentUsage);

            // Assert

            ReloadData();

            var storedValue = repository.GetShowRecentUsage();

            Assert.That(storedValue, Is.EqualTo(showRecentUsage));
        }
示例#2
0
        public void ShowRecentUsageCanBeReset()
        {
            // Arrange

            const bool defaultShowRecentUsage = false;

            var repository = new StoredSettingsRepository();

            repository.SetShowRecentUsage(true);

            // Act

            repository.Reset();

            // Assert

            var storedValue = repository.GetShowRecentUsage();

            Assert.That(storedValue, Is.EqualTo(defaultShowRecentUsage));
        }