Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: ResponseFoodDto Date/Time 타입 주석처리 (#66) #71

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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