Skip to content

Commit

Permalink
refactor: 리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
wugawuga committed Oct 16, 2023
1 parent aee1bbb commit 49000cb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
public class RecipeCommentsResponse {

private final List<RecipeCommentResponse> comments;
private final Boolean hasNext;
private final boolean hasNext;
private final Long totalElements;

private RecipeCommentsResponse(final List<RecipeCommentResponse> comments, final Boolean hasNext,
private RecipeCommentsResponse(final List<RecipeCommentResponse> comments, final boolean hasNext,
final Long totalElements) {
this.comments = comments;
this.hasNext = hasNext;
this.totalElements = totalElements;
}

public static RecipeCommentsResponse toResponse(final List<RecipeCommentResponse> comments, final Boolean hasNext,
public static RecipeCommentsResponse toResponse(final List<RecipeCommentResponse> comments, final boolean hasNext,
final Long totalElements) {
return new RecipeCommentsResponse(comments, hasNext, totalElements);
}

public Boolean getHasNext() {
return hasNext;
}

public List<RecipeCommentResponse> getComments() {
return comments;
}

public boolean getHasNext() {
return hasNext;
}

public Long getTotalElements() {
return totalElements;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,10 @@ class writeCommentOfRecipe_성공_테스트 {
@Test
void 꿀조합에_댓글을_작성할__있다() {
// given
final var category = 카테고리_가_요청(new Category("간편식사", CategoryType.FOOD, "siksa.jpeg"));
final var product1 = new Product("불닭볶음면", 1000L, "image.png", "엄청 매운 불닭", category);
final var product2 = new Product("참치 삼김", 2000L, "image.png", "담백한 참치마요 삼김", category);
final var product3 = new Product("스트링 치즈", 1500L, "image.png", "고소한 치즈", category);
final var category = 카테고리_간편식사_생성();
final var product1 = 상품_삼각김밥_가1000_평점2_생성(category);
final var product2 = 상품_삼각김밥_가3000_평점4_생성(category);
final var product3 = 상품_삼각김밥_가2000_평점3_생성(category);
복수_상품_저장(product1, product2, product3);
final var author = 멤버_멤버1_생성();
단일_멤버_저장(author);
Expand Down Expand Up @@ -594,10 +594,10 @@ class writeCommentOfRecipe_실패_테스트 {
@Test
void 존재하지_않은_멤버가_꿀조합에_댓글을_작성하면_예외가_발생한다() {
// given
final var category = 카테고리_가_요청(new Category("간편식사", CategoryType.FOOD, "siksa.jpeg"));
final var product1 = new Product("불닭볶음면", 1000L, "image.png", "엄청 매운 불닭", category);
final var product2 = new Product("참치 삼김", 2000L, "image.png", "담백한 참치마요 삼김", category);
final var product3 = new Product("스트링 치즈", 1500L, "image.png", "고소한 치즈", category);
final var category = 카테고리_간편식사_생성();
final var product1 = 상품_삼각김밥_가1000_평점2_생성(category);
final var product2 = 상품_삼각김밥_가3000_평점4_생성(category);
final var product3 = 상품_삼각김밥_가2000_평점3_생성(category);
복수_상품_저장(product1, product2, product3);
final var author = new Member("author", "image.png", "1");
단일_멤버_저장(author);
Expand Down Expand Up @@ -637,10 +637,10 @@ class getCommentsOfRecipe_성공_테스트 {
@Test
void 꿀조합에_달린_댓글들을_커서페이징을_통해_조회할__있다__댓글_15__첫페이지_댓글_10개조회() {
// given
final var category = 카테고리_가_요청(new Category("간편식사", CategoryType.FOOD, "siksa.jpeg"));
final var product1 = new Product("불닭볶음면", 1000L, "image.png", "엄청 매운 불닭", category);
final var product2 = new Product("참치 삼김", 2000L, "image.png", "담백한 참치마요 삼김", category);
final var product3 = new Product("스트링 치즈", 1500L, "image.png", "고소한 치즈", category);
final var category = 카테고리_간편식사_생성();
final var product1 = 상품_삼각김밥_가1000_평점2_생성(category);
final var product2 = 상품_삼각김밥_가3000_평점4_생성(category);
final var product3 = 상품_삼각김밥_가2000_평점3_생성(category);
복수_상품_저장(product1, product2, product3);
final var author = 멤버_멤버1_생성();
단일_멤버_저장(author);
Expand Down Expand Up @@ -685,10 +685,10 @@ class getCommentsOfRecipe_성공_테스트 {
@Test
void 꿀조합에_달린_댓글들을_커서페이징을_통해_조회할__있다__댓글_15__마지막페이지_댓글_5개조회() {
// given
final var category = 카테고리_가_요청(new Category("간편식사", CategoryType.FOOD, "siksa.jpeg"));
final var product1 = new Product("불닭볶음면", 1000L, "image.png", "엄청 매운 불닭", category);
final var product2 = new Product("참치 삼김", 2000L, "image.png", "담백한 참치마요 삼김", category);
final var product3 = new Product("스트링 치즈", 1500L, "image.png", "고소한 치즈", category);
final var category = 카테고리_간편식사_생성();
final var product1 = 상품_삼각김밥_가1000_평점2_생성(category);
final var product2 = 상품_삼각김밥_가3000_평점4_생성(category);
final var product3 = 상품_삼각김밥_가2000_평점3_생성(category);
복수_상품_저장(product1, product2, product3);
final var author = 멤버_멤버1_생성();
단일_멤버_저장(author);
Expand Down

0 comments on commit 49000cb

Please sign in to comment.