Inheritance: BaseEndpoint
Exemplo n.º 1
0
		public async Task TestGetCommentReplies()
		{
			var imgurClient = await AuthenticationHelpers.CreateOAuth2AuthenticatedImgurClient();
			var commentEndpoint = new CommentEndpoint(imgurClient);
			var comment = await commentEndpoint.GetCommentRepliesAsync(193421419);

			// Assert the Reponse
			Assert.IsNotNull(comment.Data);
			Assert.AreEqual(comment.Success, true);
			Assert.AreEqual(comment.Status, HttpStatusCode.OK);
		}
Exemplo n.º 2
0
		public async Task TestDeleteComment()
		{
			var imgurClient = await AuthenticationHelpers.CreateOAuth2AuthenticatedImgurClient();
			var commentEndpoint = new CommentEndpoint(imgurClient);
			var comment = await commentEndpoint.CreateCommentAsync("test reply", "161n8BB", 193421419);
			var deleteComment = await commentEndpoint.DeleteCommentAsync(comment.Data.Id);

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

			// Assert the Data
			Assert.AreEqual(deleteComment.Data, true);
		}
Exemplo n.º 3
0
		public async Task TestGetComment()
		{
			var imgurClient = await AuthenticationHelpers.CreateOAuth2AuthenticatedImgurClient();
			var commentEndpoint = new CommentEndpoint(imgurClient);
			var comment = await commentEndpoint.GetCommentAsync(192351802);

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

			// Assert the Data
			Assert.AreEqual(comment.Data.OnAlbum, false);
			Assert.AreEqual(comment.Data.AlbumCover, null);
			Assert.AreEqual(comment.Data.Author, "imgurnet");
		}
Exemplo n.º 4
0
		public async Task TestReportComment()
		{
			var imgurClient = await AuthenticationHelpers.CreateOAuth2AuthenticatedImgurClient();
			var commentEndpoint = new CommentEndpoint(imgurClient);
			var comment = await commentEndpoint.ReportCommentAsync(193420645);

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