public CreateReply ( long repositoryId, int number, PullRequestReviewCommentReplyCreate comment ) : IObservable |
||
repositoryId | long | The Id of the repository |
number | int | The pull request number |
comment | PullRequestReviewCommentReplyCreate | The comment |
return | IObservable |
public async Task EnsuresNonNullArguments() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservablePullRequestReviewCommentsClient(gitHubClient); string body = "Comment content"; int inReplyTo = 7; var comment = new PullRequestReviewCommentReplyCreate(body, inReplyTo); Assert.Throws<ArgumentNullException>(() => client.CreateReply(null, "name", 1, comment)); Assert.Throws<ArgumentNullException>(() => client.CreateReply("owner", null, 1, comment)); Assert.Throws<ArgumentNullException>(() => client.CreateReply("owner", "name", 1, null)); Assert.Throws<ArgumentNullException>(() => client.CreateReply(1, 1, null)); Assert.Throws<ArgumentException>(() => client.CreateReply("", "name", 1, comment)); Assert.Throws<ArgumentException>(() => client.CreateReply("owner", "", 1, comment)); }
public void PostsToCorrectUrlWithRepositoryId() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservablePullRequestReviewCommentsClient(gitHubClient); var comment = new PullRequestReviewCommentReplyCreate("Comment content", 9); client.CreateReply(1, 13, comment); gitHubClient.PullRequest.ReviewComment.Received().CreateReply(1, 13, comment); }