Hi,
I am using JustMock for some app.config settings:
Mock.Arrange(() => ConfigurationManager.AppSettings["MyAppSettingKey1"]).Returns("MyAppSettingValue1");
Mock.Arrange(() => ConfigurationManager.AppSettings["MyAppSettingKey2"]).Returns("MyAppSettingValue2");
Mock.Arrange(() => ConfigurationManager.AppSettings["MyAppSettingKey3"]).Returns("MyAppSettingValue3");
However, if I do this, other values that are not explicitly mocked are not available:
var myValue = ConfigurationManager.AppSettings["MyAppSettingKeyNotMocked"])
throws a System.NullReferenceException
Is there a better way to mock Configuration.AppSettings?