public void UpdateExistentDefaultConfigStoreWithValueUpdates()
        {
            try
            {
                var newConfigStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);
                newConfigStore.SettingsShouldBeInitialized();

                newConfigStore.Properties["Key1"] = "Value1";
                newConfigStore.Properties["Key2"] = "Value2";
                newConfigStore.Save();

                var existentConfigStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);
                existentConfigStore.Properties.Should().BeEquivalentTo(newConfigStore.Properties);
                existentConfigStore.Properties["Key1"] = "Value3";
                existentConfigStore.Properties["Key2"] = "Value4";
                existentConfigStore.Save();

                var reloadConfigStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);
                reloadConfigStore.Properties.Should().NotContainValues("Value1", "Value2");
                reloadConfigStore.Properties.Should().BeEquivalentTo(existentConfigStore.Properties);
            }
            finally
            {
                var configStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);
                configStore.Delete();
            }
        }
        public void DeleteExistentDefaultConfigStoreDoesNotThrow()
        {
            var configStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);

            configStore.SettingsShouldBeInitialized();
            configStore.Properties["Key1"] = "Value1";
            configStore.Save();
            Action(() => configStore.Delete()).Should().NotThrow();
        }
        public void PropertyNameIsCaseInsensitive()
        {
            try
            {
                var configStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);
                configStore.SettingsShouldBeInitialized();

                configStore.Properties["PropertyNameWithCasing"] = "Value1";
                configStore.Save();

                configStore.Properties["propertynamewithcasing"].Should().Be("Value1");
            }
            finally
            {
                var configStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);
                configStore.Delete();
            }
        }
        public void SaveNonexistentDefaultConfigStore()
        {
            try
            {
                var configStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);
                configStore.SettingsShouldBeInitialized();

                configStore.Properties["Key1"] = "Value1";
                configStore.Properties["Key2"] = "Value2";
                configStore.Save();

                var reloadConfigStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);
                reloadConfigStore.Properties.Should().BeEquivalentTo(configStore.Properties);
            }
            finally
            {
                var configStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);
                configStore.Delete();
            }
        }
        public void DefaultConfigStoreIsInitiallyEmpty()
        {
            var configStore = new ConfigStore(_affiliateApplication.Name, ConfigStoreCollection.DEFAULT_CONFIG_STORE_IDENTIFIER);

            configStore.SettingsShouldBeInitialized();
        }