Skip to content

Commit

Permalink
test: 테스트 코드 반환 dto 수정 (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeong-hyeok committed Oct 21, 2023
1 parent c1f194d commit ae4629e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void setUp() {
void 맵기_가_하나_조회() throws Exception {
//given
Long evaluationId = 1L;
EvaluationGetResponseDto responseDto = new EvaluationGetResponseDto("신라면", 1, 2);
EvaluationGetResponseDto responseDto = new EvaluationGetResponseDto("신라면", "1", 2);

//when
when(evaluationService.getOneEvaluation(anyString(), anyLong())).thenReturn(responseDto);
Expand All @@ -142,8 +142,8 @@ void setUp() {
//given
PageRequest pageable = PageRequest.of(0, 2);
List<EvaluationsGetResponseDto> dtos = new ArrayList<>();
dtos.add(new EvaluationsGetResponseDto(1L, "신라면", 3400, 1, 3));
dtos.add(new EvaluationsGetResponseDto(2L, "진라면", 1270, 2, 2));
dtos.add(new EvaluationsGetResponseDto(1L, "신라면", 3400, "1", 3));
dtos.add(new EvaluationsGetResponseDto(2L, "진라면", 1270, "2", 2));
Slice<EvaluationsGetResponseDto> response = new SliceImpl<>(dtos, pageable, false);

//when
Expand All @@ -162,8 +162,8 @@ void setUp() {
//given
PageRequest pageable = PageRequest.of(0, 2);
List<EvaluationSearchResponseDto> dtos = new ArrayList<>();
dtos.add(new EvaluationSearchResponseDto("신라면", 1, 3));
dtos.add(new EvaluationSearchResponseDto("진라면", 2, 2));
dtos.add(new EvaluationSearchResponseDto("신라면", "1", 3));
dtos.add(new EvaluationSearchResponseDto("진라면", "2", 2));
Slice<EvaluationSearchResponseDto> response = new SliceImpl<>(dtos, pageable, false);

//when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ void setUp() {
//given
PageRequest pageable = PageRequest.of(0, 2);
List<FoodSearchResponseDto> dtos = new ArrayList<>();
dtos.add(new FoodSearchResponseDto("신라면", 1, 3400));
dtos.add(new FoodSearchResponseDto("진라면", 2, 1270));
dtos.add(new FoodSearchResponseDto("신라면", "1", 3400));
dtos.add(new FoodSearchResponseDto("진라면", "2", 1270));
Slice<FoodSearchResponseDto> response = new SliceImpl<>(dtos, pageable, false);

//when
Expand All @@ -75,7 +75,7 @@ void setUp() {
@Test
void 음식_스코빌_지수_검색() throws Exception {
//given
FoodScovilleSearchResponseDto responseDto = new FoodScovilleSearchResponseDto("신라면", 1, 3400);
FoodScovilleSearchResponseDto responseDto = new FoodScovilleSearchResponseDto("신라면", "1", 3400);

//when
given(foodService.searchFoodScoville(anyString())).willReturn(responseDto);
Expand All @@ -93,7 +93,7 @@ void setUp() {
void 음식_상세_정보_조회() throws Exception {
//given
Long foodId = 1L;
FoodGetResponseDto responseDto = new FoodGetResponseDto(foodId, "신라면", 1, true, 5);
FoodGetResponseDto responseDto = new FoodGetResponseDto(foodId, "신라면", "1", true, 5);

//when
when(foodService.getOneFood(anyString(), anyLong())).thenReturn(responseDto);
Expand Down

0 comments on commit ae4629e

Please sign in to comment.