Skip to content

Commit

Permalink
refactor: 다음 페이지가 존재하는지는 hasNext로 통일
Browse files Browse the repository at this point in the history
  • Loading branch information
70825 committed Oct 16, 2023
1 parent 69fd2e2 commit c097b67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package com.funeat.review.dto;

import com.funeat.common.dto.PageDto;
import java.util.List;

public class SortingReviewsResponse {

private final List<SortingReviewDto> reviews;
private final Boolean hasNextReview;
private final Boolean hasNext;

public SortingReviewsResponse(final List<SortingReviewDto> reviews, final Boolean hasNextReview) {
public SortingReviewsResponse(final List<SortingReviewDto> reviews, final Boolean hasNext) {
this.reviews = reviews;
this.hasNextReview = hasNextReview;
this.hasNext = hasNext;
}

public static SortingReviewsResponse toResponse(final List<SortingReviewDto> reviews, final Boolean hasNextReview) {
Expand All @@ -21,7 +20,7 @@ public List<SortingReviewDto> getReviews() {
return reviews;
}

public Boolean getHasNextReview() {
return hasNextReview;
public Boolean getHasNext() {
return hasNext;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class CommonSteps {
}

public static void 다음_데이터가_있는지_검증한다(final ExtractableResponse<Response> response, final boolean expected) {
final var actual = response.jsonPath().getBoolean("hasNextReview");
final var actual = response.jsonPath().getBoolean("hasNext");

assertThat(actual).isEqualTo(expected);
}
Expand Down

0 comments on commit c097b67

Please sign in to comment.