示例#1
0
        public void TestUnexistingKeyReturnsNull()
        {
            _manager = new AppConfigProvider();

            var value = _manager.Get("nonExisting");
            Assert.IsNull(value);
        }
示例#2
0
        public void TestNoProviderReturnsEmptyString()
        {
            try
            {
                _manager = new AppConfigProvider();
                ConfigurationManager.AppSettings["existingKey"] = "myValue";
                var value = _manager.Get("existingKey");
                Assert.AreEqual("myValue", value);
            }
            finally
            {
                ConfigurationManager.AppSettings["existingKey"] = null;
            }

        }