Skip to content

Commit 23ab879

Browse files
committed
CLAP-184 Fix: 작업 조회 테스트 응답 객체 수정
1 parent 481fb48 commit 23ab879

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/test/java/clap/server/application/service/task/FindTaskListServiceTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package clap.server.application.service.task;
22

3+
import clap.server.adapter.inbound.web.dto.common.PageResponse;
34
import clap.server.adapter.inbound.web.dto.task.FilterTaskListRequest;
45
import clap.server.adapter.inbound.web.dto.task.OrderTaskRequest;
56
import clap.server.adapter.inbound.web.dto.task.FilterPendingApprovalResponse;
@@ -66,25 +67,25 @@ void findPendingApprovalTasks_ReturnFilteredTasks() {
6667
.thenReturn(expectedResponse);
6768

6869
// when
69-
Page<FilterPendingApprovalResponse> result = findTaskListService.findPendingApprovalTasks(managerId, pageable, filterTaskListRequest);
70+
PageResponse<FilterPendingApprovalResponse> result = findTaskListService.findPendingApprovalTasks(managerId, pageable, filterTaskListRequest);
7071

7172
// then
7273
assertThat(result).isNotNull();
73-
assertThat(result.getTotalElements()).isEqualTo(2);
74+
assertThat(result.totalElements()).isEqualTo(2);
7475

75-
assertThat(result.getContent()).hasSize(2)
76+
assertThat(result.content()).hasSize(2)
7677
.extracting(FilterPendingApprovalResponse::taskId)
7778
.containsExactly(1L, 2L);
7879

79-
assertThat(result.getContent().get(0))
80+
assertThat(result.content().get(0))
8081
.extracting(FilterPendingApprovalResponse::taskId, FilterPendingApprovalResponse::taskCode,
8182
FilterPendingApprovalResponse::requestedAt, FilterPendingApprovalResponse::mainCategoryName,
8283
FilterPendingApprovalResponse::categoryName, FilterPendingApprovalResponse::title,
8384
FilterPendingApprovalResponse::requesterName)
8485
.containsExactly(1L, "TC001", LocalDateTime.of(2025, 1, 24, 12, 30),
8586
"메인 카테고리", "서브 카테고리", "작업 제목", "atom.park");
8687

87-
assertThat(result.getContent().get(1))
88+
assertThat(result.content().get(1))
8889
.extracting(FilterPendingApprovalResponse::taskId, FilterPendingApprovalResponse::taskCode,
8990
FilterPendingApprovalResponse::requestedAt, FilterPendingApprovalResponse::mainCategoryName,
9091
FilterPendingApprovalResponse::categoryName, FilterPendingApprovalResponse::title,

0 commit comments

Comments
 (0)