public void ReturnsNullWhenNotFoundAndNotRequired()
            {
                IConfig config = new Config();
                string result = config.GetConfigValue("doesnt-exist", isRequired: false);

                Assert.IsNull(result);
            }
            public void ReturnsTheDefaultValueWhenConfigValueNotFound()
            {
                IConfig config = new Config();
                string expectedResult = "default-value";
                string actualResult = config.GetConfigValue("doesnt-exist", false, defaultValue: expectedResult);

                Assert.AreEqual(expectedResult, actualResult);
            }
            public void ReturnsTheRequestedValue()
            {
                // <add key="sampleSetting" value="default-value"/>
                IConfig config = new Config();

                string settingName = "sampleSetting";
                string expectedResult = "default-value";
                string actualResult = config.GetConfigValue(settingName);

                Assert.AreEqual(expectedResult, actualResult);
            }
 public void ThrowsWhenNotFoundAndRequired()
 {
     IConfig config = new Config();
     string result = config.GetConfigValue("doesnt-exist", isRequired: true);
 }