public void TestGetPostComment() { var comment = PostCommentService.GetPostComment(PostCommentMockings.GetGuid(0)).GetAwaiter() .GetResult(); Assert.AreEqual(PostCommentMockings.GetGuid(0), comment.Id); }
public void TestGetPostComments() { var comments = PostCommentService.GetPostComments(PostCommentMockings.GetGuid(1)) .GetAwaiter().GetResult(); Assert.AreEqual(30, comments.Count); }
public void TestGetPostCommentsPart() { var comments = new List <PostComment>(); for (int i = 1; i < 7; i++) { comments.AddRange(PostCommentService .GetPostComments(PostCommentMockings.GetGuid(1), comments.Count == 0 ? DateTimeOffset.Now : comments.Last().CommentedAt, 5) .GetAwaiter().GetResult()); Assert.AreEqual(comments.Min(comment => comment.CommentedAt), comments.Last().CommentedAt); Assert.AreEqual(i * 5, comments.Count); } }
public static void PostCommentClassInitialize(TestContext testContext) { PostCommentMockings.Initalize(); }