test if all reactions can be created

This commit is contained in:
Martin Scholz
2016-06-22 08:32:44 +02:00
parent c1a16ffc74
commit bdc222132b
4 changed files with 129 additions and 20 deletions
@@ -40,15 +40,42 @@ public class PullRequestReviewCommentReactionsClientTests : IDisposable
AssertComment(commentFromGitHub, body, position);
var pullRequestReviewCommentReaction = await _github.Reaction.PullRequestReviewComment.Create(_context.RepositoryOwner, _context.RepositoryName, commentFromGitHub.Id, new NewReaction(ReactionType.Heart));
var newReactionConfused = new NewReaction(ReactionType.Confused);
var newReactionHeart = new NewReaction(ReactionType.Heart);
var newReactionHooray = new NewReaction(ReactionType.Hooray);
var newReactionLaugh = new NewReaction(ReactionType.Laugh);
var newReactionMinus1 = new NewReaction(ReactionType.Minus1);
var newReactionPlus1 = new NewReaction(ReactionType.Plus1);
var reactionConfused = await _github.Reaction.PullRequestReviewComment.Create(_context.RepositoryOwner, _context.RepositoryName, commentFromGitHub.Id, newReactionConfused);
var reactionHeart = await _github.Reaction.PullRequestReviewComment.Create(_context.RepositoryOwner, _context.RepositoryName, commentFromGitHub.Id, newReactionHeart);
var reactionHooray = await _github.Reaction.PullRequestReviewComment.Create(_context.RepositoryOwner, _context.RepositoryName, commentFromGitHub.Id, newReactionHooray);
var reactionLaugh = await _github.Reaction.PullRequestReviewComment.Create(_context.RepositoryOwner, _context.RepositoryName, commentFromGitHub.Id, newReactionLaugh);
var reactionMinus1 = await _github.Reaction.PullRequestReviewComment.Create(_context.RepositoryOwner, _context.RepositoryName, commentFromGitHub.Id, newReactionMinus1);
var reactionPlus1 = await _github.Reaction.PullRequestReviewComment.Create(_context.RepositoryOwner, _context.RepositoryName, commentFromGitHub.Id, newReactionPlus1);
Assert.NotNull(pullRequestReviewCommentReaction);
Assert.IsType<Reaction>(reactionConfused);
Assert.Equal(ReactionType.Confused, reactionConfused.Content);
Assert.Equal(commentFromGitHub.User.Id, reactionConfused.User.Id);
Assert.IsType<Reaction>(pullRequestReviewCommentReaction);
Assert.IsType<Reaction>(reactionHeart);
Assert.Equal(ReactionType.Heart, reactionHeart.Content);
Assert.Equal(commentFromGitHub.User.Id, reactionHeart.User.Id);
Assert.Equal(ReactionType.Heart, pullRequestReviewCommentReaction.Content);
Assert.IsType<Reaction>(reactionHooray);
Assert.Equal(ReactionType.Hooray, reactionHooray.Content);
Assert.Equal(commentFromGitHub.User.Id, reactionHooray.User.Id);
Assert.Equal(commentFromGitHub.User.Id, pullRequestReviewCommentReaction.User.Id);
Assert.IsType<Reaction>(reactionLaugh);
Assert.Equal(ReactionType.Laugh, reactionLaugh.Content);
Assert.Equal(commentFromGitHub.User.Id, reactionLaugh.User.Id);
Assert.IsType<Reaction>(reactionMinus1);
Assert.Equal(ReactionType.Minus1, reactionMinus1.Content);
Assert.Equal(commentFromGitHub.User.Id, reactionMinus1.User.Id);
Assert.IsType<Reaction>(reactionPlus1);
Assert.Equal(ReactionType.Plus1, reactionPlus1.Content);
Assert.Equal(commentFromGitHub.User.Id, reactionPlus1.User.Id);
}
/// <summary>