Пример #1
0
        public void Parse_sequence_verb_with_multi_instance_returns_verb_instance()
        {
            var expected = new SequenceOptions {
                LongSequence = new long[] { }, StringSequence = new[] { "s1", "s2" }
            };
            var result = InvokeChoose(
                new[] { typeof(Add_Verb), typeof(Commit_Verb), typeof(Clone_Verb), typeof(SequenceOptions) },
                new[] { "sequence", "-s", "s1", "-s", "s2" },
                true);

            Assert.IsType <SequenceOptions>(((Parsed <object>)result).Value);
            expected.Should().BeEquivalentTo(((Parsed <object>)result).Value);
        }
Пример #2
0
        public void Parse_sequence_verb_with_separator_returns_verb_instance(string[] arguments, string[] expectedString)
        {
            // Fixture setup
            var expected = new SequenceOptions {
                LongSequence = new long[] { }, StringSequence = expectedString
            };

            // Exercize system
            var result = InvokeChoose(
                new[] { typeof(Add_Verb), typeof(Commit_Verb), typeof(Clone_Verb), typeof(SequenceOptions) },
                arguments);

            // Verify outcome
            Assert.IsType <SequenceOptions>(((Parsed <object>)result).Value);
            expected.Should().BeEquivalentTo(((Parsed <object>)result).Value);
            // Teardown
        }
Пример #3
0
        public void Parse_sequence_verb_returns_verb_instance()
        {
            // Fixture setup
            var expected = new SequenceOptions {
                LongSequence = new long[] { }, StringSequence = new[] { "aa", "b" }
            };

            // Exercize system
            var result = InvokeChoose(
                new[] { typeof(Add_Verb), typeof(Commit_Verb), typeof(Clone_Verb), typeof(SequenceOptions) },
                new[] { "sequence", "-s", "aa", "b" });

            // Verify outcome
            Assert.IsType <SequenceOptions>(((Parsed <object>)result).Value);
            expected.Should().BeEquivalentTo(((Parsed <object>)result).Value);
            // Teardown
        }