Skip to content

Commit b918663

Browse files
committed
test(volunteer-apply): 봉사자 조회 기능 변경에 따른 봉사 지원 조회 기능 리팩토링 테스트
1 parent 838e8d4 commit b918663

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/test/java/com/somemore/domains/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,7 @@ void applyWhenDuplicate() {
9191
recruitBoardRepository.save(board);
9292

9393
UUID volunteerId = UUID.randomUUID();
94-
VolunteerApply apply = VolunteerApply.builder()
95-
.volunteerId(volunteerId)
96-
.recruitBoardId(board.getId())
97-
.status(WAITING)
98-
.attended(false)
99-
.build();
94+
VolunteerApply apply = createVolunteerApply(volunteerId, board.getId());
10095
volunteerApplyRepository.save(apply);
10196

10297
VolunteerApplyCreateRequestDto dto = VolunteerApplyCreateRequestDto.builder()
@@ -111,7 +106,16 @@ void applyWhenDuplicate() {
111106
.hasMessage(DUPLICATE_APPLICATION.getMessage());
112107
}
113108

114-
private static RecruitBoard createRecruitBoard(RecruitStatus status) {
109+
private VolunteerApply createVolunteerApply(UUID volunteerId, Long recruitBoardId) {
110+
return VolunteerApply.builder()
111+
.volunteerId(volunteerId)
112+
.recruitBoardId(recruitBoardId)
113+
.status(WAITING)
114+
.attended(false)
115+
.build();
116+
}
117+
118+
private RecruitBoard createRecruitBoard(RecruitStatus status) {
115119

116120
LocalDateTime startDateTime = createStartDateTime();
117121
LocalDateTime endDateTime = startDateTime.plusHours(2);

0 commit comments

Comments
 (0)