Skip to content

Commit c45a67c

Browse files
committed
refactor: 리뷰 적용
- refactor: 변수명, 필드명 일관성 맞추기 - test: assertAll 적용
1 parent 961b005 commit c45a67c

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.example.solidconnection.admin.dto;
22

33
public record MentorApplicationCountResponse(
4-
long approved,
5-
long pending,
6-
long rejected
4+
long approvedCount,
5+
long pendingCount,
6+
long rejectedCount
77
) {
88

99
}

src/test/java/com/example/solidconnection/admin/service/AdminMentorApplicationServiceTest.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import static com.example.solidconnection.common.exception.ErrorCode.MENTOR_APPLICATION_UNIVERSITY_NOT_SELECTED;
66
import static org.assertj.core.api.Assertions.assertThat;
77
import static org.assertj.core.api.AssertionsForClassTypes.assertThatCode;
8+
import static org.junit.jupiter.api.Assertions.assertAll;
89

910
import com.example.solidconnection.admin.dto.MentorApplicationCountResponse;
1011
import com.example.solidconnection.admin.dto.MentorApplicationRejectRequest;
@@ -353,9 +354,11 @@ class 멘토_지원서_상태별_개수_조회 {
353354
MentorApplicationCountResponse response = adminMentorApplicationService.getMentorApplicationCount();
354355

355356
// then
356-
assertThat(response.approved()).isEqualTo(expectedApprovedCount.size());
357-
assertThat(response.pending()).isEqualTo(expectedPendingCount.size());
358-
assertThat(response.rejected()).isEqualTo(expectedRejectedCount.size());
357+
assertAll(
358+
() -> assertThat(response.approvedCount()).isEqualTo(expectedApprovedCount.size()),
359+
() -> assertThat(response.pendingCount()).isEqualTo(expectedPendingCount.size()),
360+
() -> assertThat(response.rejectedCount()).isEqualTo(expectedRejectedCount.size())
361+
);
359362
}
360363

361364
@Test
@@ -367,9 +370,11 @@ class 멘토_지원서_상태별_개수_조회 {
367370
MentorApplicationCountResponse response = adminMentorApplicationService.getMentorApplicationCount();
368371

369372
// then
370-
assertThat(response.approved()).isEqualTo(0L);
371-
assertThat(response.pending()).isEqualTo(0L);
372-
assertThat(response.rejected()).isEqualTo(0L);
373+
assertAll(
374+
() -> assertThat(response.approvedCount()).isEqualTo(0L),
375+
() -> assertThat(response.pendingCount()).isEqualTo(0L),
376+
() -> assertThat(response.rejectedCount()).isEqualTo(0L)
377+
);
373378
}
374379
}
375380
}

0 commit comments

Comments
 (0)