public void UpdateSettingWithProperVersionTest()
        {
            const string newSetting = "New Setting";

            ISettingProvider provider = new SingleVersionSettingProvider(TestVersion, _testSetting);

            provider.UpdateSetting(TestVersion, newSetting);

            var updatedSetting = provider.GetLatestSetting();

            Assert.AreEqual(newSetting, updatedSetting);
        }
        public void UpdateSettingWithWrongVersionTest()
        {
            const string originalSetting = "Original Setting";
            const string newSetting      = "New Setting";
            const int    version         = 1;

            ISettingProvider provider = new SingleVersionSettingProvider();

            provider.UpdateSetting(version, newSetting);

            Assert.IsNull(provider.GetLatestSetting());

            provider.AddSetting(originalSetting);

            Assert.AreEqual(originalSetting, provider[version]);

            provider.UpdateSetting(version + 1, newSetting);

            Assert.AreEqual(originalSetting, provider[version]);
            Assert.AreEqual(originalSetting, provider.GetLatestSetting());
        }