예제 #1
0
        public void Works_fine_with_unset_values()
        {
            Dictionary <string, string> args         = new Dictionary <string, string>();
            ArgsConfigSource            configSource = new ArgsConfigSource(args);

            Assert.IsFalse(configSource.GetValue(typeof(int), "a", "a").IsSet);
        }
예제 #2
0
        public void Can_parse_various_values(Type valueType, string valueString, object parsedValue)
        {
            Dictionary <string, string> args = new Dictionary <string, string>();

            args.Add("A.a", valueString);
            ArgsConfigSource configSource = new ArgsConfigSource(args);

            Assert.AreEqual(parsedValue, configSource.GetValue(valueType, "a", "A").Value);
        }
예제 #3
0
        public void Is_case_insensitive()
        {
            Dictionary <string, string> args = new Dictionary <string, string>();

            args.Add("A.a", "12");
            ArgsConfigSource configSource = new ArgsConfigSource(args);

            Assert.IsTrue(configSource.GetValue(typeof(int), "a", "A").IsSet);
        }