VoteCommentAsync() public method

Vote on a comment
public VoteCommentAsync ( System.Int64 commentId, VoteDirection vote ) : Task>
commentId System.Int64 The Id of the comment
vote VoteDirection The vote to give the comment
return Task>
Exemplo n.º 1
0
		public async Task TestVoteComment()
		{
			var imgurClient = await AuthenticationHelpers.CreateOAuth2AuthenticatedImgurClient();
			var commentEndpoint = new CommentEndpoint(imgurClient);
			var comment = await commentEndpoint.GetCommentAsync(193421419);
			var votedComment = await commentEndpoint.VoteCommentAsync(comment.Data.Id, VoteDirection.Up);

			// Assert the Reponse
			Assert.IsNotNull(votedComment.Data);
			Assert.AreEqual(votedComment.Success, true);
			Assert.AreEqual(votedComment.Status, HttpStatusCode.OK);
		}