mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 12:42:32 +00:00
Add integration test for issue comment reactions
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Octokit;
|
||||
using Octokit.Tests.Integration;
|
||||
using Xunit;
|
||||
|
||||
public class IssueCommentsClientTests
|
||||
{
|
||||
private readonly IIssueCommentsClient _issueCommentsClient;
|
||||
|
||||
public IssueCommentsClientTests()
|
||||
{
|
||||
var github = Helper.GetAuthenticatedClient();
|
||||
_issueCommentsClient = github.Issue.Comment;
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task CanDeserializeIssueComment()
|
||||
{
|
||||
var comments = await _issueCommentsClient.GetAllForIssue("alfhenrik-test", "repo-with-issue-comment-reactions", 1);
|
||||
|
||||
Assert.True(comments.Count > 0);
|
||||
var comment = comments[0];
|
||||
Assert.Equal(3, comment.Reactions.TotalCount);
|
||||
Assert.Equal(1, comment.Reactions.Plus1);
|
||||
Assert.Equal(1, comment.Reactions.Hooray);
|
||||
Assert.Equal(1, comment.Reactions.Heart);
|
||||
Assert.Equal(0, comment.Reactions.Laugh);
|
||||
Assert.Equal(0, comment.Reactions.Confused);
|
||||
Assert.Equal(0, comment.Reactions.Minus1);
|
||||
}
|
||||
}
|
||||
@@ -86,6 +86,7 @@
|
||||
<Compile Include="Clients\GitHubClientTests.cs" />
|
||||
<Compile Include="Clients\IssueCommentReactionsClientTests.cs" />
|
||||
<Compile Include="Clients\IssueReactionsClientTests.cs" />
|
||||
<Compile Include="Clients\IssueCommentsClientTests.cs" />
|
||||
<Compile Include="Clients\MergingClientTests.cs" />
|
||||
<Compile Include="Clients\CommitsClientTests.cs" />
|
||||
<Compile Include="Clients\CommitStatusClientTests.cs" />
|
||||
|
||||
Reference in New Issue
Block a user