From cf3e595ce4bff084b16b35d333faf749d63354b0 Mon Sep 17 00:00:00 2001 From: wellbeing-dough Date: Sun, 26 Nov 2023 18:11:10 +0900 Subject: [PATCH] =?UTF-8?q?[Test]=20:=20CommentRepositoryTest=20=ED=95=84?= =?UTF-8?q?=EC=9A=94=EC=97=86=EB=8A=94=20=EC=A3=BC=EC=84=9D=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comment/repository/CommentRepositoryTest.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/test/java/kr/co/studyhubinu/studyhubserver/comment/repository/CommentRepositoryTest.java b/src/test/java/kr/co/studyhubinu/studyhubserver/comment/repository/CommentRepositoryTest.java index 47939c4e..e8a54bc3 100644 --- a/src/test/java/kr/co/studyhubinu/studyhubserver/comment/repository/CommentRepositoryTest.java +++ b/src/test/java/kr/co/studyhubinu/studyhubserver/comment/repository/CommentRepositoryTest.java @@ -31,23 +31,15 @@ class CommentRepositoryTest { CommentEntity comment2 = CommentEntityFixture.COMMENT_2.commentEntity_생성(2L, userId, postId); commentRepository.save(comment1); commentRepository.save(comment2); + // when Pageable pageable = PageRequest.of(0, 10); Slice comments = commentRepository.findSliceByPostIdWithUserId(1L, userId, pageable); // then assertThat(comments.getContent()).hasSize(2); - - System.out.println(comments); - CommentResponse commentResponse1 = comments.getContent().get(1); CommentResponse commentResponse2 = comments.getContent().get(0); - - System.out.println("**************commentResponse1: " + commentResponse1.getCreatedDate()); - System.out.println("**************commentResponse2: " + commentResponse2.getCreatedDate()); - System.out.println("**************commentResponse1: " + commentResponse1.getContent()); - System.out.println("**************commentResponse2: " + commentResponse2.getContent()); - assertAll( () -> assertEquals(comment1.getId(), commentResponse1.getCommentId()), () -> assertEquals(comment1.getContent(), commentResponse1.getContent()),