Skip to content

Commit

Permalink
Merge pull request #71 from CAUSOLDOUTMEN/feature/66-fix-hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
synoti21 authored Nov 10, 2023
2 parents a5d54cb + 7e16431 commit 92b7a18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ public class ResponseFoodDto {
private Long foodId;
private Long userId;
private String name;
private LocalDate date;
private LocalTime time;
//private LocalDate date;
//private LocalTime time;
private BaseNutrition baseNutrition;
private boolean isFavorite;

public static ResponseFoodDto of(Long foodId, Long userId, String name, LocalDate date, LocalTime time, BaseNutrition baseNutrition, boolean isFavorite) {
return new ResponseFoodDto(foodId, userId, name, date, time, baseNutrition, isFavorite);
return new ResponseFoodDto(foodId, userId, name, baseNutrition, isFavorite);
}

public static ResponseFoodDto from(Food food) {
return new ResponseFoodDto(food.getId(), food.getUser().getId(), food.getName(), food.getDate(), food.getTime(), food.getBaseNutrition(), food.isFavorite());
return new ResponseFoodDto(food.getId(), food.getUser().getId(), food.getName(), food.getBaseNutrition(), food.isFavorite());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void testGetFoodListByDate() throws Exception {
.andExpect(MockMvcResultMatchers.jsonPath("$.header.code").value(expectedResponse.getHeader().getCode()))
.andExpect(MockMvcResultMatchers.jsonPath("$.header.message").value(expectedResponse.getHeader().getMessage()))
.andExpect(MockMvcResultMatchers.jsonPath("$.data[0].name").value(expectedResponse.getData().get(0).getName()))
.andExpect(MockMvcResultMatchers.jsonPath("$.data[0].date").value(expectedResponse.getData().get(0).getDate().toString()))
//.andExpect(MockMvcResultMatchers.jsonPath("$.data[0].date").value(expectedResponse.getData().get(0).getDate().toString()))
//.andExpect(MockMvcResultMatchers.jsonPath("$.data[0].time").value(expectedResponse.getData().get(0).getTime().toString()))
.andExpect(MockMvcResultMatchers.jsonPath("$.data[0].baseNutrition.kcal").value(expectedResponse.getData().get(0).getBaseNutrition().getKcal()))
.andExpect(MockMvcResultMatchers.jsonPath("$.data[0].baseNutrition.carbohydrate").value(expectedResponse.getData().get(0).getBaseNutrition().getCarbohydrate()))
Expand Down

0 comments on commit 92b7a18

Please sign in to comment.