public void TestGetProfileComment() { var comment = ProfileCommentService.GetProfileComment(ProfileCommentMockings.GetGuid(0)).GetAwaiter() .GetResult(); Assert.AreEqual(ProfileCommentMockings.GetGuid(0), comment.Id); }
public void TestGetCommentsByUser() { var comments = ProfileCommentService.GetCommentsByUser(ProfileCommentMockings.GetGuid(0)) .GetAwaiter().GetResult(); Assert.AreEqual(15, comments.Count); }
public void TestGetCommentsByUserPart() { var comments = new List <ProfileComment>(); for (int i = 1; i < 4; i++) { comments.AddRange(ProfileCommentService .GetCommentsByUser(ProfileCommentMockings.GetGuid(0), 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 ProfileCommentClassInitialize(TestContext testContext) { ProfileCommentMockings.Initalize(); }