Пример #1
0
        public void FromEnvironmentProviderTest_NullRetrieval()
        {
            var fromEnvironmentProvider = new FromEnvironmentProvider();

            Environment.SetEnvironmentVariable("ExistingKey", "ExistingKeyValue");

            var nullKeyValue = fromEnvironmentProvider.GetRawSetting(null);
        }
Пример #2
0
        public void FromEnvironmentProviderTest_NonExistingRetrieval()
        {
            var fromEnvironmentProvider = new FromEnvironmentProvider();

            Environment.SetEnvironmentVariable("ExistingKey", "ExistingKeyValue");

            var notExistingKeyValue = fromEnvironmentProvider.GetRawSetting("NotExistingKey");

            Assert.IsNull(notExistingKeyValue, "Not existing key value is not null!");
        }
Пример #3
0
        public void FromEnvironmentProviderTest_SimpleRetrieval()
        {
            var fromEnvironmentProvider = new FromEnvironmentProvider();

            Environment.SetEnvironmentVariable("ExistingKey", "ExistingKeyValue");

            var existingKeyValue = fromEnvironmentProvider.GetRawSetting("ExistingKey");

            Assert.AreEqual("ExistingKeyValue", existingKeyValue);
        }