예제 #1
0
        public void ParseCommandLineArguments_ShouldUseBaseParserToParseArgs()
        {
            var args = new[] { "foo", "bar" };

            _parser.ParseCommandLineArguments(args);

            _baseParser.Received().ParseCommandLineArguments(args);
        }
예제 #2
0
        public CommandLineArguments ParseCommandLineArguments(IEnumerable <string> args)
        {
            var dict   = _baseParser.ParseCommandLineArguments(args);
            var result = new CommandLineArguments(dict);

            return(result);
        }
예제 #3
0
        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"));
        }
예제 #4
0
 protected override void OnStartup(StartupEventArgs e)
 {
     Arguments = argumentParser.ParseCommandLineArguments(e.Args);
     base.OnStartup(e);
 }