From 152c92dac6cd569ea1cd962412b7c5d4a85c0c27 Mon Sep 17 00:00:00 2001 From: 70825 Date: Tue, 2 Apr 2024 23:45:08 +0900 Subject: [PATCH] test16 --- .../funeat/review/application/ReviewServiceTest.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/test/java/com/funeat/review/application/ReviewServiceTest.java b/src/test/java/com/funeat/review/application/ReviewServiceTest.java index 5193e142..b36a46ed 100644 --- a/src/test/java/com/funeat/review/application/ReviewServiceTest.java +++ b/src/test/java/com/funeat/review/application/ReviewServiceTest.java @@ -399,7 +399,7 @@ class sortingReviews_성공_테스트 { Thread.sleep(100); final var review3 = 리뷰_이미지test3_평점3점_재구매X_생성(member, product, 130L); 복수_리뷰_저장(review1, review2, review3); - //entityManager.clear(); + entityManager.clear(); final var request = 리뷰정렬요청_최신순_생성(3L); final var expected = List.of(review2.getId(), review1.getId()); @@ -408,13 +408,9 @@ class sortingReviews_성공_테스트 { // when final var actual = reviewService.sortingReviews(productId, memberId, request).getReviews(); - System.out.println("asdfasdf"); - if (actual.size() == 3) { - assertThat(review3_1.getCreatedAt()).isEqualTo(actual.get(0).getCreatedAt()); - } else { - assertThat(actual.size()).isEqualTo(3L); - assertThat(review3_1.getCreatedAt()).isEqualTo(actual.get(0).getCreatedAt()); - } + + System.out.println("review3.created_at" + review3_1.getCreatedAt()); + System.out.println(actual.get(0).getContent()); // then assertThat(actual).extracting(SortingReviewDto::getId)