public void ValueOptionAttributeValuesAreNotMandatory()
        {
            var options = new SimpleOptionsWithValueOption();
            Result = base.Parser.ParseArguments(
                new string[] { "--switch" }, options);

            ResultShouldBeTrue();

            options.BooleanValue.Should().Be.True();
            options.StringItem.Should().Be.Null();
            options.IntegerItem.Should().Equal(0);
            options.NullableDoubleItem.Should().Be.Null();
        }
        public void Value_option_attribute_values_are_not_mandatory()
        {
            var options = new SimpleOptionsWithValueOption();
            var parser = new CommandLineParser();
            var result = parser.ParseArguments(
                new string[] { "--switch" }, options);

            result.Should().BeTrue();

            options.BooleanValue.Should().BeTrue();
            options.StringItem.Should().BeNull();
            options.IntegerItem.Should().Be(0);
            options.NullableDoubleItem.Should().NotHaveValue();
        }
        public void ValueOptionAttributeIsolatesNonOptionValues()
        {
            var options = new SimpleOptionsWithValueOption();
            Result = base.Parser.ParseArguments(
                new string[] { "--switch", "file.ext", "1000", "0.1234", "-s", "out.ext" }, options);

            ResultShouldBeTrue();

            options.BooleanValue.Should().Be.True();
            options.StringItem.Should().Equal("file.ext");
            options.IntegerItem.Should().Equal(1000);
            options.NullableDoubleItem.Should().Equal(0.1234D);
            options.StringValue.Should().Equal("out.ext");
        }
        public void Value_option_attribute_isolates_non_option_values()
        {
            var options = new SimpleOptionsWithValueOption();
            var parser = new CommandLineParser();
            var result = parser.ParseArguments(
                new string[] { "--switch", "file.ext", "1000", "0.1234", "-s", "out.ext" }, options);

            result.Should().BeTrue();

            options.BooleanValue.Should().BeTrue();
            options.StringItem.Should().Be("file.ext");
            options.IntegerItem.Should().Be(1000);
            options.NullableDoubleItem.Should().Be(0.1234D);
            options.StringValue.Should().Be("out.ext");
        }