From 7e1643195fd549f4c87741fa5647fb0afb032bd7 Mon Sep 17 00:00:00 2001 From: CHAE Date: Fri, 10 Nov 2023 22:09:22 +0900 Subject: [PATCH] =?UTF-8?q?:ambulance:=20Fix:=20ResponseFoodDto=20Date/Tim?= =?UTF-8?q?e=20=ED=83=80=EC=9E=85=20=EC=A3=BC=EC=84=9D=EC=B2=98=EB=A6=AC?= =?UTF-8?q?=20(#66)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/diareat/diareat/food/dto/ResponseFoodDto.java | 8 ++++---- .../diareat/diareat/controller/FoodControllerTest.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/diareat/diareat/food/dto/ResponseFoodDto.java b/src/main/java/com/diareat/diareat/food/dto/ResponseFoodDto.java index 1430c32..46d2055 100644 --- a/src/main/java/com/diareat/diareat/food/dto/ResponseFoodDto.java +++ b/src/main/java/com/diareat/diareat/food/dto/ResponseFoodDto.java @@ -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()); } } diff --git a/src/test/java/com/diareat/diareat/controller/FoodControllerTest.java b/src/test/java/com/diareat/diareat/controller/FoodControllerTest.java index 4dc0a76..0d3c743 100644 --- a/src/test/java/com/diareat/diareat/controller/FoodControllerTest.java +++ b/src/test/java/com/diareat/diareat/controller/FoodControllerTest.java @@ -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()))