コード例 #1
0
        public void Is_case_insensitive()
        {
            EnvConfigSource configSource = new EnvConfigSource();

            Environment.SetEnvironmentVariable("NETHERMIND_A_A", "12", EnvironmentVariableTarget.Process);
            Assert.IsTrue(configSource.GetValue(typeof(int), "a", "A").IsSet);
        }
コード例 #2
0
        public void Can_parse_various_values(Type valueType, string valueString, object parsedValue)
        {
            Environment.SetEnvironmentVariable("NETHERMIND_A_A", valueString, EnvironmentVariableTarget.Process);
            EnvConfigSource configSource = new EnvConfigSource();

            Assert.AreEqual(parsedValue, configSource.GetValue(valueType, "a", "A").Value);
        }
コード例 #3
0
        public void Works_fine_with_unset_values()
        {
            EnvConfigSource configSource = new EnvConfigSource();

            Assert.IsFalse(configSource.GetValue(typeof(int), "b", "a").IsSet);
        }