public async Task Should_Get_All_Base_Store_Values() { var settingValues = await _settingProvider.GetAllAsync(); settingValues.ShouldContain(sv => sv.Name == "MySetting1" && sv.Value == "42"); settingValues.ShouldContain(sv => sv.Name == "MySetting2" && sv.Value == "default-store-value"); settingValues.ShouldContain(sv => sv.Name == "SettingNotSetInStore" && sv.Value == "default-value"); }
private async Task <ApplicationSettingConfigurationDto> GetSettingConfigAsync() { var result = new ApplicationSettingConfigurationDto { Values = new Dictionary <string, string>() }; var settingDefinitions = _settingDefinitionManager.GetAll().Where(x => x.IsVisibleToClients); var settingValues = await _settingProvider.GetAllAsync(settingDefinitions.Select(x => x.Name).ToArray()); foreach (var settingValue in settingValues) { result.Values[settingValue.Name] = settingValue.Value; } return(result); }