public void ParseCommandLineArguments_ShouldUseBaseParserToParseArgs() { var args = new[] { "foo", "bar" }; _parser.ParseCommandLineArguments(args); _baseParser.Received().ParseCommandLineArguments(args); }
public CommandLineArguments ParseCommandLineArguments(IEnumerable <string> args) { var dict = _baseParser.ParseCommandLineArguments(args); var result = new CommandLineArguments(dict); return(result); }
public void ParseCommandLineArguments_ShouldReturnBaseParserResult() { var args = new[] { "foo", "bar" }; var typedArgs = new Dictionary <string, string> { { "foo", "bar" }, { "bar", "foo" } }; _baseParser.ParseCommandLineArguments(args).Returns(typedArgs); var result = _parser.ParseCommandLineArguments(args); Assert.That(result.Raw["foo"], Is.EqualTo("bar")); Assert.That(result.Raw["bar"], Is.EqualTo("foo")); }
protected override void OnStartup(StartupEventArgs e) { Arguments = argumentParser.ParseCommandLineArguments(e.Args); base.OnStartup(e); }