コード例 #1
0
ファイル: HelpTextFixture.cs プロジェクト: usertoroot/MNIJ
        public void DetailedHelpWithMissingRequired()
        {
            var options = new ComplexOptionsWithHelp();

            bool result = new CommandLineParser(new CommandLineParserSettings(Console.Out)).ParseArguments(
                new string[] { "-j0" }, options);

            Assert.IsFalse(result);
        }
コード例 #2
0
ファイル: HelpTextFixture.cs プロジェクト: usertoroot/MNIJ
        public void DetailedHelpWithBadMutualExclusiveness()
        {
            var options = new ComplexOptionsWithHelp();

            bool result = new CommandLineParser(new CommandLineParserSettings(true, true, Console.Out)).ParseArguments(
                new string[] { "-iIN.FILE", "-oOUT.FILE", "--offset", "99", "-ap" }, options);

            Assert.IsFalse(result);
        }
コード例 #3
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();
        }
コード例 #4
0
ファイル: HelpTextFixture.cs プロジェクト: usertoroot/MNIJ
        public void DetailedHelpWithBadFormat()
        {
            var options = new ComplexOptionsWithHelp();

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

            Assert.IsFalse(result);
        }
コード例 #5
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();
        }
コード例 #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();
        }
コード例 #7
0
ファイル: HelpTextFixture.cs プロジェクト: HyperInfo/TimeLaps
        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();
        }
コード例 #8
0
ファイル: HelpTextFixture.cs プロジェクト: HyperInfo/TimeLaps
        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();
        }
コード例 #9
0
ファイル: HelpTextFixture.cs プロジェクト: HyperInfo/TimeLaps
        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();
        }
コード例 #10
0
        public void DetailedHelpWithMissingRequiredAndBadFormat()
        {
            var options = new ComplexOptionsWithHelp();

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

            result.Should().Be.False();
        }
コード例 #11
0
        public void DetailedHelpWithBadFormatAndMutualExclusiveness()
        {
            var options = new ComplexOptionsWithHelp();

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

            result.Should().Be.False();
        }
コード例 #12
0
ファイル: HelpTextFixture.cs プロジェクト: wsky/commandline
        public void DetailedHelpWithMissingRequired()
        {
            var options = new ComplexOptionsWithHelp();

            bool result = new CommandLineParser(new CommandLineParserSettings(Console.Out)).ParseArguments(
                new string[] { "-j0" }, options);

            Assert.IsFalse(result);
        }
コード例 #13
0
ファイル: HelpTextFixture.cs プロジェクト: wsky/commandline
        public void DetailedHelpWithBadMutualExclusiveness()
        {
            var options = new ComplexOptionsWithHelp();

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

            Assert.IsFalse(result);
        }
コード例 #14
0
ファイル: HelpTextFixture.cs プロジェクト: wsky/commandline
        public void DetailedHelpWithBadFormat()
        {
            var options = new ComplexOptionsWithHelp();

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

            Assert.IsFalse(result);
        }