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); }
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); }