Add reactions to issue, commit comment and review payload (#1405)

* add reactions to issue response payload

* add reactions to commit comment payload

* add reactions to review comment payload

* create tests for issue client

* tests for commitcomment client

* tests for pull request review comment

* change observable tests

* simplify strings

* remove unnecessary clients

* change integration tests to retrieve all reaction types

* create integration test for issue comment client

* fix merge conflicts

* fix merge conflicts

* gets tests passing again

* fix some reaction integration tests

* Fixup unit tests wth preview accepts header
Also applied preview header to a couple of repositoryId based calls that were added by another PR

* Fixup unit tests wth preview accepts header
Also applied preview header to a couple of repositoryId based calls that were added by another PR

* Rework reaction payload tests for IssueComments to handle Get, GetAllForIssue and GetAllForRepository calls

* [WIP] reaction payload tests

* Rework reaction payload tests for IssueComments to handle Get, GetAllForIssue and GetAllForRepository calls

* Rework reaction payload tests for Issues client

* Rework reaction payload tests for PullRequestReviews client

* Rework reaction payload tests for CommitComments client

* Revert "[WIP] reaction payload tests"

This reverts commit a6179b0f21a3ddfe36bfd3ae5eafae0e69b52252.
This commit is contained in:
Martin Scholz
2016-07-08 12:29:08 +02:00
committed by Ryan Gribble
parent 3e18580de2
commit 72e30a7f90
23 changed files with 745 additions and 148 deletions
@@ -64,7 +64,7 @@ namespace Octokit.Tests.Reactive
client.GetAllForRepository("fake", "repo");
githubClient.Connection.Received(1).Get<List<CommitComment>>(Arg.Is<Uri>(uri => uri.ToString() == "repos/fake/repo/comments"),
Args.EmptyDictionary, null);
Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview");
}
[Fact]
@@ -75,7 +75,7 @@ namespace Octokit.Tests.Reactive
client.GetAllForRepository(1);
githubClient.Connection.Received(1).Get<List<CommitComment>>(Arg.Is<Uri>(uri => uri.ToString() == "repositories/1/comments"),
Args.EmptyDictionary, null);
Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview");
}
[Fact]
@@ -93,7 +93,7 @@ namespace Octokit.Tests.Reactive
client.GetAllForRepository("fake", "repo", options);
githubClient.Connection.Received(1).Get<List<CommitComment>>(Arg.Is<Uri>(uri => uri.ToString() == "repos/fake/repo/comments"),
Arg.Is<Dictionary<string, string>>(dictionary => dictionary.Count == 2), null);
Arg.Is<Dictionary<string, string>>(dictionary => dictionary.Count == 2), "application/vnd.github.squirrel-girl-preview");
}
[Fact]
@@ -111,7 +111,7 @@ namespace Octokit.Tests.Reactive
client.GetAllForRepository(1, options);
githubClient.Connection.Received(1).Get<List<CommitComment>>(Arg.Is<Uri>(uri => uri.ToString() == "repositories/1/comments"),
Arg.Is<Dictionary<string, string>>(dictionary => dictionary.Count == 2), null);
Arg.Is<Dictionary<string, string>>(dictionary => dictionary.Count == 2), "application/vnd.github.squirrel-girl-preview");
}
[Fact]
@@ -145,7 +145,7 @@ namespace Octokit.Tests.Reactive
client.GetAllForCommit("fake", "repo", "sha");
githubClient.Connection.Received().Get<List<CommitComment>>(Arg.Is(new Uri("repos/fake/repo/commits/sha/comments", UriKind.Relative)),
Args.EmptyDictionary, null);
Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview");
}
[Fact]
@@ -156,7 +156,7 @@ namespace Octokit.Tests.Reactive
client.GetAllForCommit(1, "sha");
githubClient.Connection.Received().Get<List<CommitComment>>(Arg.Is(new Uri("repositories/1/commits/sha/comments", UriKind.Relative)),
Args.EmptyDictionary, null);
Args.EmptyDictionary, "application/vnd.github.squirrel-girl-preview");
}
[Fact]
@@ -174,7 +174,7 @@ namespace Octokit.Tests.Reactive
client.GetAllForCommit("fake", "repo", "sha", options);
githubClient.Connection.Received().Get<List<CommitComment>>(Arg.Is(new Uri("repos/fake/repo/commits/sha/comments", UriKind.Relative)),
Arg.Is<IDictionary<string, string>>(d => d.Count == 2), null);
Arg.Is<IDictionary<string, string>>(d => d.Count == 2), "application/vnd.github.squirrel-girl-preview");
}
[Fact]
@@ -192,7 +192,7 @@ namespace Octokit.Tests.Reactive
client.GetAllForCommit(1, "sha", options);
githubClient.Connection.Received().Get<List<CommitComment>>(Arg.Is(new Uri("repositories/1/commits/sha/comments", UriKind.Relative)),
Arg.Is<IDictionary<string, string>>(d => d.Count == 2), null);
Arg.Is<IDictionary<string, string>>(d => d.Count == 2), "application/vnd.github.squirrel-girl-preview");
}
[Fact]