Skip to content

Commit 67293b2

Browse files
committed
mod:: dto 수정에 따른 test 코드 수정
1 parent 39263b6 commit 67293b2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ontime-back/src/test/java/devkor/ontime_back/controller/ScheduleControllerTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import devkor.ontime_back.ControllerTestSupport;
77
import devkor.ontime_back.TestSecurityConfig;
88
import devkor.ontime_back.dto.*;
9+
import devkor.ontime_back.entity.DoneStatus;
910
import jakarta.servlet.http.HttpServletRequest;
1011
import org.junit.jupiter.api.DisplayName;
1112
import org.junit.jupiter.api.Test;
@@ -42,8 +43,8 @@ void getPeriodSchedule_success() throws Exception {
4243
LocalDateTime endDate = LocalDateTime.of(2024, 11, 18, 20, 0);
4344

4445
List<ScheduleDto> mockSchedules = List.of(
45-
new ScheduleDto(UUID.randomUUID(), new PlaceDto(UUID.randomUUID(), "과학도서관"), "공부하기", 10, startDate, 5, "늦으면 안됨", 2),
46-
new ScheduleDto(UUID.randomUUID(), new PlaceDto(UUID.randomUUID(), "중식당"), "가족행사", 15, startDate.plusHours(2), 10, "생신", 0)
46+
new ScheduleDto(UUID.randomUUID(), new PlaceDto(UUID.randomUUID(), "과학도서관"), "공부하기", 10, startDate, 5, "늦으면 안됨", 2, DoneStatus.NORMAL),
47+
new ScheduleDto(UUID.randomUUID(), new PlaceDto(UUID.randomUUID(), "중식당"), "가족행사", 15, startDate.plusHours(2), 10, "생신", 0, DoneStatus.NORMAL)
4748
);
4849
when(userAuthService.getUserIdFromToken(any(HttpServletRequest.class))).thenReturn(userId);
4950
when(scheduleService.showSchedulesByPeriod(userId, startDate, endDate)).thenReturn(mockSchedules);
@@ -74,7 +75,7 @@ void getScheduleById_success() throws Exception {
7475
Long userId = 1L;
7576
UUID scheduleId = UUID.randomUUID();
7677

77-
ScheduleDto mockSchedule = new ScheduleDto(scheduleId, new PlaceDto(UUID.randomUUID(), "과학도서관"), "공부하기", 10, LocalDateTime.of(2024, 11, 15, 18, 0), 5, "늦으면 안됨", 2);
78+
ScheduleDto mockSchedule = new ScheduleDto(scheduleId, new PlaceDto(UUID.randomUUID(), "과학도서관"), "공부하기", 10, LocalDateTime.of(2024, 11, 15, 18, 0), 5, "늦으면 안됨", 2, DoneStatus.NOT_ENDED);
7879

7980
when(userAuthService.getUserIdFromToken(any(HttpServletRequest.class))).thenReturn(userId);
8081
when(scheduleService.showScheduleByScheduleId(userId, scheduleId)).thenReturn(mockSchedule);

0 commit comments

Comments
 (0)