Example #1
0
        public void ParseOptionsWithDefaults()
        {
            var  options = new SimpleOptionsWithDefaults();
            bool result  = base.Parser.ParseArguments(new string[] {}, options);

            base.AssertParserSuccess(result);
            Assert.AreEqual("str", options.StringValue);
            Assert.AreEqual(9, options.IntegerValue);
            Assert.AreEqual(true, options.BooleanValue);
        }
Example #2
0
        public void Parse_options_with_defaults()
        {
            var options = new SimpleOptionsWithDefaults();
            var parser  = new CommandLine.Parser();
            var result  = parser.ParseArguments(new string[] {}, options);

            result.Should().BeTrue();
            options.StringValue.Should().Be("str");
            options.IntegerValue.Should().Be(9);
            options.BooleanValue.Should().BeTrue();
        }