Beispiel #1
0
        public void Given_Null_Parameters_When_WithSha_Invoked_Then_It_Return_Value(string value, string expected)
        {
            var mpr = new MergePullRequest();

            var result = MergePullRequestExtensions.WithSha(mpr, value);

            result.Sha.Should().BeEquivalentTo(expected);
        }
Beispiel #2
0
        public void Given_Null_Parameters_When_WithMergeMethod_Invoked_Then_It_Return_Value(PullRequestMergeMethod value, PullRequestMergeMethod expected)
        {
            var mpr = new MergePullRequest();

            var result = MergePullRequestExtensions.WithMergeMethod(mpr, value);

            result.MergeMethod.Should().Be(expected);
        }
Beispiel #3
0
        public void Given_Null_Parameters_When_WithMergeMethod_Invoked_Then_It_Throws_Exception()
        {
            var mpr = new MergePullRequest();

            Action action = () => MergePullRequestExtensions.WithMergeMethod(null, PullRequestMergeMethod.Merge);

            action.Should().Throw <ArgumentNullException>();
        }
Beispiel #4
0
        public void Given_Null_Parameters_When_WithCommitMessage_Invoked_Then_It_Throws_Exception()
        {
            Action action = () => MergePullRequestExtensions.WithCommitMessage(null, null);

            action.Should().Throw <ArgumentNullException>();
        }