Esempio n. 1
0
        public void Detailed_help_with_bad_format_and_mutual_exclusiveness()
        {
            var options = new ComplexOptionsWithHelp();

            bool result = new CommandLine.Parser(new ParserSettings(true, true, Console.Out)).ParseArguments(
                new string[] { "-iIN.FILE", "-oOUT.FILE", "--offset", "zero", "-pa" }, options);

            result.Should().BeFalse();
        }
Esempio n. 2
0
        public void Detailed_help_with_missing_required_and_bad_format()
        {
            var options = new ComplexOptionsWithHelp();

            bool result = new CommandLine.Parser(new ParserSettings(Console.Out)).ParseArguments(
                new string[] { "-i0" }, options);

            result.Should().BeFalse();
        }
Esempio n. 3
0
        public void Detailed_help_with_bad_format()
        {
            var options = new ComplexOptionsWithHelp();

            bool result = new CommandLine.Parser(new ParserSettings(Console.Out)).ParseArguments(
                new string[] { "-iIN.FILE", "-oOUT.FILE", "--offset", "abc" }, options);

            result.Should().BeFalse();
        }
Esempio n. 4
0
        public void Detailed_help_with_missing_required_and_bad_format()
        {
            var options = new ComplexOptionsWithHelp();

            bool result = new CommandLine.Parser(new ParserSettings(Console.Out)).ParseArguments(
                new string[] { "-i0" }, options);

            result.Should().BeFalse();
        }
Esempio n. 5
0
        public void Detailed_help_with_bad_mutual_exclusiveness()
        {
            var options = new ComplexOptionsWithHelp();

            bool result = new CommandLine.Parser(new ParserSettings(true, true, Console.Out)).ParseArguments(
                new string[] { "-iIN.FILE", "-oOUT.FILE", "--offset", "0", "-ap" }, options);

            result.Should().BeFalse();
        }
Esempio n. 6
0
        public void Detailed_help_with_bad_format()
        {
            var options = new ComplexOptionsWithHelp();

            bool result = new CommandLine.Parser(new ParserSettings(Console.Out)).ParseArguments(
                new string[] { "-iIN.FILE", "-oOUT.FILE", "--offset", "abc" }, options);

            result.Should().BeFalse();
        }