public Create ( long repositoryId, int number, PullRequestReviewCommentCreate comment ) : IObservable |
||
repositoryId | long | The Id of the repository |
number | int | The Pull Request number |
comment | PullRequestReviewCommentCreate | The comment |
return | IObservable |
public IObservable<PullRequestReviewComment> Create(long repositoryId, int number, PullRequestReviewCommentCreate comment)
{
Ensure.ArgumentNotNull(comment, "comment");
return _client.Create(repositoryId, number, comment).ToObservable();
}
ObservablePullRequestReviewCommentsClient::Create ( string owner, string name, int number, PullRequestReviewCommentCreate comment ) : IObservable |
public async Task EnsuresNonNullArguments() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservablePullRequestReviewCommentsClient(gitHubClient); string body = "Comment content"; string commitId = "qe3dsdsf6"; string path = "file.css"; int position = 7; var comment = new PullRequestReviewCommentCreate(body, commitId, path, position); Assert.Throws<ArgumentNullException>(() => client.Create(null, "name", 1, comment)); Assert.Throws<ArgumentNullException>(() => client.Create("owner", null, 1, comment)); Assert.Throws<ArgumentNullException>(() => client.Create("owner", "name", 1, null)); Assert.Throws<ArgumentNullException>(() => client.Create(1, 1, null)); Assert.Throws<ArgumentException>(() => client.Create("", "name", 1, comment)); Assert.Throws<ArgumentException>(() => client.Create("owner", "", 1, comment)); }