コード例 #1
0
        public void TestGetPostComment()
        {
            var comment = PostCommentService.GetPostComment(PostCommentMockings.GetGuid(0)).GetAwaiter()
                          .GetResult();

            Assert.AreEqual(PostCommentMockings.GetGuid(0), comment.Id);
        }
コード例 #2
0
        public void TestGetPostComments()
        {
            var comments = PostCommentService.GetPostComments(PostCommentMockings.GetGuid(1))
                           .GetAwaiter().GetResult();

            Assert.AreEqual(30, comments.Count);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 public static void PostCommentClassInitialize(TestContext testContext)
 {
     PostCommentMockings.Initalize();
 }