public Create ( long repositoryId, int number, string newComment ) : Task |
||
repositoryId | long | The Id of the repository |
number | int | The number of the issue |
newComment | string | The new comment to add to the issue |
return | Task |
public Task<IssueComment> Create(long repositoryId, int number, string newComment)
{
Ensure.ArgumentNotNull(newComment, "newComment");
return ApiConnection.Post<IssueComment>(ApiUrls.IssueComments(repositoryId, number), new BodyWrapper(newComment));
}
IssueCommentsClient::Create ( string owner, string name, int number, string newComment ) : Task |
public void PostsToCorrectUrl() { const string newComment = "some title"; var connection = Substitute.For<IApiConnection>(); var client = new IssueCommentsClient(connection); client.Create("fake", "repo", 1, newComment); connection.Received().Post<IssueComment>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/1/comments"), Arg.Any<object>()); }