public void Parsing_mutually_exclusive_options_and_required_option_fails() { var options = new OptionsWithMultipleSetAndOneOption(); var parser = new Parser(new ParserSettings { MutuallyExclusive = true }); var result = parser.ParseArguments(new string[] { "-g167", "--hue", "205" }, options); result.Should().BeFalse(); }
public void Parsing_mutually_exclusive_options_and_required_option_succeeds() { var options = new OptionsWithMultipleSetAndOneOption(); var parser = new Parser(new ParserSettings { MutuallyExclusive = true }); var result = parser.ParseArguments(new string[] { "-g100", "-h200", "-cRgbColorSet" }, options); result.Should().BeTrue(); options.Green.Should().Be((byte)100); options.Hue.Should().Be((short)200); options.DefaultColorSet.Should().Be(ColorSet.RgbColorSet); }