Esempio n. 1
0
        public void NamedParameters_MixedNaming_ParsesValues()
        {
            var store = new CommandLineConfigStore(new[] { "-v:123", "--version:123", "-x5", "nothing" }, null);

            string v = store.Read("v");

            Assert.Equal("123", v);
        }
Esempio n. 2
0
        public void PositionalParameters_returned_as_value()
        {
            var store = new CommandLineConfigStore(new[] { "create", "name=thename" },
                                                   new Dictionary <int, Option>
            {
                { 0, new Option <string>("positional", null) }
            });


            Assert.Equal("create", store.Read("positional"));
            Assert.Equal("thename", store.Read("name"));
        }