示例#1
0
        public void PathAsAnArgumentShouldNotBreakThings()
        {
            var parser  = new CommandLineParser.CommandLineParser();
            var options = new TestOptionsFalse();

            parser.ExtractArgumentAttributes(options);

            parser.ParseCommandLine(new string[] { "-p", "/root/folder" });

            Assert.Equal("/root/folder", options.Path);
        }
示例#2
0
        public void DeclarativeSwitch_SwitchArgumentFalseSet()
        {
            var parser  = new CommandLineParser.CommandLineParser();
            var options = new TestOptionsFalse();

            parser.ExtractArgumentAttributes(options);

            parser.ParseCommandLine(new string[] { "-f" });

            Assert.True(options.DefaultFalse);
        }