public void GetSettingValueRaisesExceptionWithMissingSection() { // --- Arrange const string KEY = "missingSection"; var provider = new AppConfigProvider(); // --- Act provider.GetSetting<AppConfigurationSettings>(KEY); }
public void GetSettingValueRaisesExceptionWithMissingSection() { // --- Arrange const string KEY = "missingSection"; var provider = new AppConfigProvider(); // --- Act provider.GetSetting <AppConfigurationSettings>(KEY); }
private string GetConfigValueOrThrow(string configKey) { string value = provider.GetSetting(configKey); if (value == null) { throw new Exception($"A value for key {configKey} is missing in the App.config file."); } return(value); }