Add integration test for issue comment reactions

This commit is contained in:
Henrik Andersson
2016-06-04 21:34:01 +10:00
parent f6ed0a3e22
commit 1c02a7acea
2 changed files with 36 additions and 0 deletions
@@ -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" />