Skip to content

Commit

Permalink
test11
Browse files Browse the repository at this point in the history
  • Loading branch information
70825 committed Apr 2, 2024
1 parent 8686231 commit 3e80cab
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -392,14 +392,25 @@ class sortingReviews_성공_테스트 {
final var review2 = 리뷰_이미지test4_평점4점_재구매O_생성(member, product, 24L);
Thread.sleep(100);
final var review3 = 리뷰_이미지test3_평점3점_재구매X_생성(member, product, 130L);
복수_리뷰_저장(review1, review2, review3);
Thread.sleep(100);
final var review4 = 리뷰_이미지test3_평점3점_재구매X_생성(member, product, 130L);
Thread.sleep(100);
final var review5 = 리뷰_이미지test3_평점3점_재구매X_생성(member, product, 130L);
Thread.sleep(100);
final var review6 = 리뷰_이미지test3_평점3점_재구매X_생성(member, product, 130L);
복수_리뷰_저장(review1, review2, review3, review4, review5, review6);

final var request = 리뷰정렬요청_최신순_생성(3L);

final var expected = List.of(review2.getId(), review1.getId());

// when
final var actual = reviewService.sortingReviews(productId, memberId, request).getReviews();
// if (actual.size() == 3) {
// assertThat(actual.get(0).getCreatedAt()).isEqualTo(review3.getCreatedAt());
// } else {
// assertThat(actual.get(0).getCreatedAt()).isEqualTo(review3.getCreatedAt());
// }

// then
assertThat(actual).extracting(SortingReviewDto::getId)
Expand Down

0 comments on commit 3e80cab

Please sign in to comment.