diff --git a/src/main/java/dmu/dasom/api/domain/applicant/service/ApplicantService.java b/src/main/java/dmu/dasom/api/domain/applicant/service/ApplicantService.java index d65257c..62b1b02 100644 --- a/src/main/java/dmu/dasom/api/domain/applicant/service/ApplicantService.java +++ b/src/main/java/dmu/dasom/api/domain/applicant/service/ApplicantService.java @@ -5,6 +5,8 @@ import dmu.dasom.api.domain.applicant.dto.ApplicantResponseDto; import dmu.dasom.api.domain.applicant.dto.ApplicantStatusUpdateRequestDto; import dmu.dasom.api.domain.email.enums.MailType; +import dmu.dasom.api.domain.recruit.dto.ResultCheckRequestDto; +import dmu.dasom.api.domain.recruit.dto.ResultCheckResponseDto; import dmu.dasom.api.global.dto.PageResponse; public interface ApplicantService { @@ -21,4 +23,6 @@ public interface ApplicantService { ApplicantDetailsResponseDto getApplicantByStudentNo(final String studentNo); + ResultCheckResponseDto checkResult(final ResultCheckRequestDto request); + } diff --git a/src/main/java/dmu/dasom/api/domain/applicant/service/ApplicantServiceImpl.java b/src/main/java/dmu/dasom/api/domain/applicant/service/ApplicantServiceImpl.java index 3dac68c..b0e274b 100644 --- a/src/main/java/dmu/dasom/api/domain/applicant/service/ApplicantServiceImpl.java +++ b/src/main/java/dmu/dasom/api/domain/applicant/service/ApplicantServiceImpl.java @@ -12,6 +12,10 @@ import dmu.dasom.api.domain.email.enums.MailType; import dmu.dasom.api.domain.email.service.EmailService; import dmu.dasom.api.domain.google.service.GoogleApiService; +import dmu.dasom.api.domain.recruit.dto.ResultCheckRequestDto; +import dmu.dasom.api.domain.recruit.dto.ResultCheckResponseDto; +import dmu.dasom.api.domain.recruit.enums.ResultCheckType; +import dmu.dasom.api.domain.recruit.service.RecruitService; import dmu.dasom.api.global.dto.PageResponse; import jakarta.mail.MessagingException; import lombok.RequiredArgsConstructor; @@ -22,6 +26,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.time.LocalDateTime; import java.util.Optional; import java.util.List; @@ -37,6 +42,7 @@ public class ApplicantServiceImpl implements ApplicantService { private final ApplicantRepository applicantRepository; private final EmailService emailService; private final GoogleApiService googleApiService; + private final RecruitService recruitService; @Value("${google.spreadsheet.id}") private String spreadSheetId; @@ -44,6 +50,9 @@ public class ApplicantServiceImpl implements ApplicantService { // 지원자 저장 @Override public void apply(final ApplicantCreateRequestDto request) { + if (!recruitService.isRecruitmentActive()) + throw new CustomException(ErrorCode.RECRUITMENT_NOT_ACTIVE); + final Optional applicant = findByStudentNo(request.getStudentNo()); // 이미 지원한 학번이 존재할 경우 @@ -139,6 +148,41 @@ public ApplicantDetailsResponseDto getApplicantByStudentNo(final String studentN .orElseThrow(() -> new CustomException(ErrorCode.ARGUMENT_NOT_VALID)); } + // 합격 결과 확인 + @Override + public ResultCheckResponseDto checkResult(final ResultCheckRequestDto request) { + // 결과 발표 시간 검증 + final LocalDateTime resultAnnouncementSchedule = recruitService.getResultAnnouncementSchedule(request.getType()); + + // 설정 된 시간이 현재 시간보다 이전인 경우 예외 발생 + final LocalDateTime now = LocalDateTime.now(); + if (now.isBefore(resultAnnouncementSchedule)) + throw new CustomException(ErrorCode.INVALID_INQUIRY_PERIOD); + + // 지원자 정보 조회 + final ApplicantDetailsResponseDto applicant = getApplicantByStudentNo(request.getStudentNo()); + + // 연락처 뒷자리가 일치하지 않을 경우 예외 발생 + if (!applicant.getContact().split("-")[2].equals(request.getContactLastDigit())) + throw new CustomException(ErrorCode.ARGUMENT_NOT_VALID); + + // 예약 코드 생성 + String reservationCode = recruitService.generateReservationCode(request.getStudentNo(), request.getContactLastDigit()); + + // 합격 여부 반환 + return ResultCheckResponseDto.builder() + .type(request.getType()) + .studentNo(applicant.getStudentNo()) + .name(applicant.getName()) + .reservationCode(reservationCode) + .isPassed(request.getType().equals(ResultCheckType.DOCUMENT_PASS) ? + applicant.getStatus() + .equals(ApplicantStatus.DOCUMENT_PASSED) : + applicant.getStatus() + .equals(ApplicantStatus.INTERVIEW_PASSED)) + .build(); + } + // Repository에서 ID로 지원자 조회 private Applicant findById(final Long id) { return applicantRepository.findById(id) diff --git a/src/main/java/dmu/dasom/api/domain/common/exception/ErrorCode.java b/src/main/java/dmu/dasom/api/domain/common/exception/ErrorCode.java index 1e0f24d..19ab326 100644 --- a/src/main/java/dmu/dasom/api/domain/common/exception/ErrorCode.java +++ b/src/main/java/dmu/dasom/api/domain/common/exception/ErrorCode.java @@ -34,7 +34,8 @@ public enum ErrorCode { SLOT_FULL(400, "C025", "해당 슬롯이 가득 찼습니다."), RESERVATION_NOT_FOUND(400, "C026", "예약을 찾을 수 없습니다."), SLOT_NOT_ACTIVE(400, "C027", "해당 슬롯이 비활성화 되었습니다."), - FILE_ENCODE_FAIL(400, "C028", "파일 인코딩에 실패하였습니다.") + FILE_ENCODE_FAIL(400, "C028", "파일 인코딩에 실패하였습니다."), + RECRUITMENT_NOT_ACTIVE(400, "C029", "모집 기간이 아닙니다."), ; private final int status; diff --git a/src/main/java/dmu/dasom/api/domain/recruit/controller/RecruitController.java b/src/main/java/dmu/dasom/api/domain/recruit/controller/RecruitController.java index 44e29d7..cc82b1a 100644 --- a/src/main/java/dmu/dasom/api/domain/recruit/controller/RecruitController.java +++ b/src/main/java/dmu/dasom/api/domain/recruit/controller/RecruitController.java @@ -78,7 +78,7 @@ public ResponseEntity> getRecruitSchedule() { }) @GetMapping("/result") public ResponseEntity checkResult(@ModelAttribute final ResultCheckRequestDto request) { - return ResponseEntity.ok(recruitService.checkResult(request)); + return ResponseEntity.ok(applicantService.checkResult(request)); } // 면접 일정 생성 diff --git a/src/main/java/dmu/dasom/api/domain/recruit/service/RecruitService.java b/src/main/java/dmu/dasom/api/domain/recruit/service/RecruitService.java index 08621b3..ac272dd 100644 --- a/src/main/java/dmu/dasom/api/domain/recruit/service/RecruitService.java +++ b/src/main/java/dmu/dasom/api/domain/recruit/service/RecruitService.java @@ -4,11 +4,9 @@ import dmu.dasom.api.domain.recruit.dto.ResultCheckResponseDto; import dmu.dasom.api.domain.recruit.dto.RecruitConfigResponseDto; import dmu.dasom.api.domain.recruit.dto.RecruitScheduleModifyRequestDto; -import dmu.dasom.api.domain.recruit.entity.Recruit; -import dmu.dasom.api.domain.recruit.enums.ConfigKey; +import dmu.dasom.api.domain.recruit.enums.ResultCheckType; -import java.time.LocalDate; -import java.time.LocalTime; +import java.time.LocalDateTime; import java.util.List; public interface RecruitService { @@ -17,6 +15,10 @@ public interface RecruitService { void modifyRecruitSchedule(final RecruitScheduleModifyRequestDto requestDto); - ResultCheckResponseDto checkResult(final ResultCheckRequestDto request); + String generateReservationCode(String studentNo, String contactLastDigits); + + LocalDateTime getResultAnnouncementSchedule(ResultCheckType type); + + boolean isRecruitmentActive(); } diff --git a/src/main/java/dmu/dasom/api/domain/recruit/service/RecruitServiceImpl.java b/src/main/java/dmu/dasom/api/domain/recruit/service/RecruitServiceImpl.java index 695ab9e..7dbd6ce 100644 --- a/src/main/java/dmu/dasom/api/domain/recruit/service/RecruitServiceImpl.java +++ b/src/main/java/dmu/dasom/api/domain/recruit/service/RecruitServiceImpl.java @@ -1,12 +1,7 @@ package dmu.dasom.api.domain.recruit.service; -import dmu.dasom.api.domain.applicant.dto.ApplicantDetailsResponseDto; -import dmu.dasom.api.domain.applicant.enums.ApplicantStatus; -import dmu.dasom.api.domain.applicant.service.ApplicantService; import dmu.dasom.api.domain.common.exception.CustomException; import dmu.dasom.api.domain.common.exception.ErrorCode; -import dmu.dasom.api.domain.recruit.dto.ResultCheckRequestDto; -import dmu.dasom.api.domain.recruit.dto.ResultCheckResponseDto; import dmu.dasom.api.domain.recruit.dto.RecruitConfigResponseDto; import dmu.dasom.api.domain.recruit.dto.RecruitScheduleModifyRequestDto; import dmu.dasom.api.domain.recruit.entity.Recruit; @@ -17,7 +12,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.format.DateTimeFormatter; @@ -30,7 +24,6 @@ public class RecruitServiceImpl implements RecruitService { private final RecruitRepository recruitRepository; - private final ApplicantService applicantService; // 모집 일정 설정 조회 @Override @@ -57,43 +50,28 @@ public void modifyRecruitSchedule(final RecruitScheduleModifyRequestDto request) config.updateDateTime(dateTime); } - // 합격 결과 확인 + // 모집 기간 여부 확인 @Override - public ResultCheckResponseDto checkResult(final ResultCheckRequestDto request) { - // 예약 코드 생성 - String reservationCode = generateReservationCode(request.getStudentNo(), request.getContactLastDigit()); + public boolean isRecruitmentActive() { + final LocalDateTime recruitStartPeriod = parseDateTimeFormat(findByKey(ConfigKey.RECRUITMENT_PERIOD_START).getValue()); + final LocalDateTime recruitEndPeriod = parseDateTimeFormat(findByKey(ConfigKey.RECRUITMENT_PERIOD_END).getValue()); + final LocalDateTime now = LocalDateTime.now(); + + return now.isAfter(recruitStartPeriod) && now.isBefore(recruitEndPeriod); + } + + @Override + public String generateReservationCode(String studentNo, String contactLastDigits) { + return studentNo + contactLastDigits; // 학번 전체 + 전화번호 뒤 4자리 + } - // 결과 발표 시간 검증 - final Recruit recruit = switch (request.getType()) { + @Override + public LocalDateTime getResultAnnouncementSchedule(ResultCheckType type) { + final Recruit recruit = switch (type) { case DOCUMENT_PASS -> findByKey(ConfigKey.DOCUMENT_PASS_ANNOUNCEMENT); case INTERVIEW_PASS -> findByKey(ConfigKey.INTERVIEW_PASS_ANNOUNCEMENT); }; - final LocalDateTime parsedTime = parseDateTimeFormat(recruit.getValue()); - - // 설정 된 시간이 현재 시간보다 이전인 경우 예외 발생 - final LocalDateTime now = LocalDateTime.now(); - if (now.isBefore(parsedTime)) - throw new CustomException(ErrorCode.INVALID_INQUIRY_PERIOD); - - // 지원자 정보 조회 - final ApplicantDetailsResponseDto applicant = applicantService.getApplicantByStudentNo(request.getStudentNo()); - - // 연락처 뒷자리가 일치하지 않을 경우 예외 발생 - if (!applicant.getContact().split("-")[2].equals(request.getContactLastDigit())) - throw new CustomException(ErrorCode.ARGUMENT_NOT_VALID); - - // 합격 여부 반환 - return ResultCheckResponseDto.builder() - .type(request.getType()) - .studentNo(applicant.getStudentNo()) - .name(applicant.getName()) - .reservationCode(reservationCode) - .isPassed(request.getType().equals(ResultCheckType.DOCUMENT_PASS) ? - applicant.getStatus() - .equals(ApplicantStatus.DOCUMENT_PASSED) : - applicant.getStatus() - .equals(ApplicantStatus.INTERVIEW_PASSED)) - .build(); + return parseDateTimeFormat(recruit.getValue()); } // DB에 저장된 모든 Recruit 객체를 찾아 반환 @@ -126,9 +104,4 @@ private LocalDateTime parseDateTimeFormat(String value) { } } - public String generateReservationCode(String studentNo, String contactLastDigits) { - return studentNo + contactLastDigits; // 학번 전체 + 전화번호 뒤 4자리 - } - - } diff --git a/src/test/java/dmu/dasom/api/domain/applicant/ApplicantServiceTest.java b/src/test/java/dmu/dasom/api/domain/applicant/ApplicantServiceTest.java index cfb694b..d50dd1a 100644 --- a/src/test/java/dmu/dasom/api/domain/applicant/ApplicantServiceTest.java +++ b/src/test/java/dmu/dasom/api/domain/applicant/ApplicantServiceTest.java @@ -13,6 +13,10 @@ import dmu.dasom.api.domain.email.enums.MailType; import dmu.dasom.api.domain.email.service.EmailService; import dmu.dasom.api.domain.google.service.GoogleApiService; +import dmu.dasom.api.domain.recruit.dto.ResultCheckRequestDto; +import dmu.dasom.api.domain.recruit.dto.ResultCheckResponseDto; +import dmu.dasom.api.domain.recruit.enums.ResultCheckType; +import dmu.dasom.api.domain.recruit.service.RecruitServiceImpl; import dmu.dasom.api.global.dto.PageResponse; import jakarta.mail.MessagingException; import org.junit.jupiter.api.BeforeEach; @@ -44,6 +48,9 @@ class ApplicantServiceTest { @Mock private EmailService emailService; + @Mock + private RecruitServiceImpl recruitService; + @InjectMocks private ApplicantServiceImpl applicantService; @@ -61,6 +68,7 @@ void apply_success() { // given ApplicantCreateRequestDto request = mock(ApplicantCreateRequestDto.class); when(request.getStudentNo()).thenReturn("20210000"); + when(recruitService.isRecruitmentActive()).thenReturn(true); Applicant mockApplicant = Applicant.builder() .name("홍길동") @@ -100,6 +108,7 @@ void apply_fail() { ApplicantCreateRequestDto request = mock(ApplicantCreateRequestDto.class); when(request.getStudentNo()).thenReturn("20210000"); when(applicantRepository.findByStudentNo("20210000")).thenReturn(Optional.of(mock(Applicant.class))); + when(recruitService.isRecruitmentActive()).thenReturn(true); when(request.getIsOverwriteConfirmed()).thenReturn(false); // when @@ -120,6 +129,7 @@ void apply_overwrite() { when(request.getStudentNo()).thenReturn("20210000"); Applicant existingApplicant = mock(Applicant.class); // 기존 Applicant 객체 모킹 when(applicantRepository.findByStudentNo("20210000")).thenReturn(Optional.of(existingApplicant)); + when(recruitService.isRecruitmentActive()).thenReturn(true); when(request.getIsOverwriteConfirmed()).thenReturn(true); // when @@ -334,6 +344,7 @@ void apply_overwrite_withGoogleSheets() { // given ApplicantCreateRequestDto request = mock(ApplicantCreateRequestDto.class); when(request.getStudentNo()).thenReturn("20210000"); + when(recruitService.isRecruitmentActive()).thenReturn(true); Applicant existingApplicant = mock(Applicant.class); // 기존 Applicant 객체 모킹 when(applicantRepository.findByStudentNo("20210000")).thenReturn(Optional.of(existingApplicant)); @@ -348,4 +359,89 @@ void apply_overwrite_withGoogleSheets() { verify(googleApiService).updateSheet(List.of(existingApplicant)); } + @Test + @DisplayName("합격 결과 확인 - 성공") + void checkResult_success() { + // given + LocalDateTime pastDateTime = LocalDateTime.now().minusHours(1); + when(recruitService.getResultAnnouncementSchedule(ResultCheckType.DOCUMENT_PASS)).thenReturn(pastDateTime); + + ResultCheckRequestDto request = mock(ResultCheckRequestDto.class); + when(request.getType()).thenReturn(ResultCheckType.DOCUMENT_PASS); + when(request.getStudentNo()).thenReturn("20210000"); + when(request.getContactLastDigit()).thenReturn("1234"); + + Applicant applicant = mock(Applicant.class); + when(applicantRepository.findByStudentNo("20210000")).thenReturn(Optional.of(applicant)); + + ApplicantDetailsResponseDto responseDto = mock(ApplicantDetailsResponseDto.class); + when(responseDto.getContact()).thenReturn("010-5678-1234"); + when(responseDto.getStatus()).thenReturn(ApplicantStatus.DOCUMENT_PASSED); + when(responseDto.getStudentNo()).thenReturn("20210000"); + when(responseDto.getName()).thenReturn("TestName"); + + when(applicant.toApplicantDetailsResponse()).thenReturn(responseDto); + + when(recruitService.generateReservationCode("20210000", "1234")).thenReturn("202100001234"); + + // when + ResultCheckResponseDto result = applicantService.checkResult(request); + + // then + assertNotNull(result); + assertTrue(result.getIsPassed()); + verify(recruitService).getResultAnnouncementSchedule(ResultCheckType.DOCUMENT_PASS); + verify(applicantRepository).findByStudentNo("20210000"); + } + + @Test + @DisplayName("합격 결과 확인 - 실패 (확인 기간 아님)") + void checkResult_fail_inquiryPeriod() { + // given + LocalDateTime futureDateTime = LocalDateTime.now().plusHours(1); + when(recruitService.getResultAnnouncementSchedule(ResultCheckType.DOCUMENT_PASS)).thenReturn(futureDateTime); + + ResultCheckRequestDto request = mock(ResultCheckRequestDto.class); + when(request.getType()).thenReturn(ResultCheckType.DOCUMENT_PASS); + + // when + CustomException exception = assertThrows(CustomException.class, () -> { + applicantService.checkResult(request); + }); + + // then + assertEquals(ErrorCode.INVALID_INQUIRY_PERIOD, exception.getErrorCode()); + verify(recruitService).getResultAnnouncementSchedule(ResultCheckType.DOCUMENT_PASS); + } + + @Test + @DisplayName("합격 결과 확인 - 실패 (연락처 뒷자리 불일치)") + void checkResult_fail_contactMismatch() { + // given + LocalDateTime pastDateTime = LocalDateTime.now().minusHours(1); + when(recruitService.getResultAnnouncementSchedule(ResultCheckType.DOCUMENT_PASS)).thenReturn(pastDateTime); + + ResultCheckRequestDto request = mock(ResultCheckRequestDto.class); + when(request.getType()).thenReturn(ResultCheckType.DOCUMENT_PASS); + when(request.getStudentNo()).thenReturn("20210000"); + when(request.getContactLastDigit()).thenReturn("0000"); + + Applicant applicant = mock(Applicant.class); + when(applicantRepository.findByStudentNo("20210000")).thenReturn(Optional.of(applicant)); + + ApplicantDetailsResponseDto responseDto = mock(ApplicantDetailsResponseDto.class); + when(responseDto.getContact()).thenReturn("010-5678-1234"); + when(applicant.toApplicantDetailsResponse()).thenReturn(responseDto); + + // when + CustomException exception = assertThrows(CustomException.class, () -> { + applicantService.checkResult(request); + }); + + // then + assertEquals(ErrorCode.ARGUMENT_NOT_VALID, exception.getErrorCode()); + verify(recruitService).getResultAnnouncementSchedule(ResultCheckType.DOCUMENT_PASS); + verify(applicantRepository).findByStudentNo("20210000"); + } + } \ No newline at end of file diff --git a/src/test/java/dmu/dasom/api/domain/recruit/RecruitServiceTest.java b/src/test/java/dmu/dasom/api/domain/recruit/RecruitServiceTest.java index 8f27694..205f4a5 100644 --- a/src/test/java/dmu/dasom/api/domain/recruit/RecruitServiceTest.java +++ b/src/test/java/dmu/dasom/api/domain/recruit/RecruitServiceTest.java @@ -102,91 +102,6 @@ void modifyRecruitSchedule_fail() { assertEquals(ErrorCode.INVALID_TIME_FORMAT, exception.getErrorCode()); } - @Test - @DisplayName("합격 결과 확인 - 성공") - void checkResult_success() { - // given - Recruit recruit = mock(Recruit.class); - when(recruitRepository.findByKey(ConfigKey.DOCUMENT_PASS_ANNOUNCEMENT)).thenReturn(Optional.of(recruit)); - String pastDateTime = LocalDateTime.now().minusHours(1) - .format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")); - when(recruit.getValue()).thenReturn(pastDateTime); - - ResultCheckRequestDto request = mock(ResultCheckRequestDto.class); - when(request.getType()).thenReturn(ResultCheckType.DOCUMENT_PASS); - when(request.getStudentNo()).thenReturn("20210000"); - when(request.getContactLastDigit()).thenReturn("1234"); - - ApplicantDetailsResponseDto applicant = mock(ApplicantDetailsResponseDto.class); - when(applicant.getContact()).thenReturn("010-5678-1234"); - when(applicant.getStatus()).thenReturn(ApplicantStatus.DOCUMENT_PASSED); - when(applicant.getStudentNo()).thenReturn("20210000"); - when(applicant.getName()).thenReturn("TestName"); - when(applicantService.getApplicantByStudentNo("20210000")).thenReturn(applicant); - - // when - ResultCheckResponseDto result = recruitService.checkResult(request); - - // then - assertNotNull(result); - assertTrue(result.getIsPassed()); - verify(recruitRepository, times(1)).findByKey(ConfigKey.DOCUMENT_PASS_ANNOUNCEMENT); - verify(applicantService, times(1)).getApplicantByStudentNo("20210000"); - } - - @Test - @DisplayName("합격 결과 확인 - 실패 (확인 기간 아님)") - void checkResult_fail_inquiryPeriod() { - // given - Recruit recruit = mock(Recruit.class); - when(recruitRepository.findByKey(ConfigKey.DOCUMENT_PASS_ANNOUNCEMENT)).thenReturn(Optional.of(recruit)); - String futureDateTime = LocalDateTime.now().plusHours(1) - .format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")); - when(recruit.getValue()).thenReturn(futureDateTime); - - ResultCheckRequestDto request = mock(ResultCheckRequestDto.class); - when(request.getType()).thenReturn(ResultCheckType.DOCUMENT_PASS); - - // when - CustomException exception = assertThrows(CustomException.class, () -> { - recruitService.checkResult(request); - }); - - // then - assertEquals(ErrorCode.INVALID_INQUIRY_PERIOD, exception.getErrorCode()); - verify(recruitRepository, times(1)).findByKey(ConfigKey.DOCUMENT_PASS_ANNOUNCEMENT); - } - - @Test - @DisplayName("합격 결과 확인 - 실패 (연락처 뒷자리 불일치)") - void checkResult_fail_contactMismatch() { - // given - Recruit recruit = mock(Recruit.class); - when(recruitRepository.findByKey(ConfigKey.DOCUMENT_PASS_ANNOUNCEMENT)).thenReturn(Optional.of(recruit)); - String pastDateTime = LocalDateTime.now().minusHours(1) - .format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")); - when(recruit.getValue()).thenReturn(pastDateTime); - - ResultCheckRequestDto request = mock(ResultCheckRequestDto.class); - when(request.getType()).thenReturn(ResultCheckType.DOCUMENT_PASS); - when(request.getStudentNo()).thenReturn("20210000"); - when(request.getContactLastDigit()).thenReturn("0000"); - - ApplicantDetailsResponseDto applicant = mock(ApplicantDetailsResponseDto.class); - when(applicant.getContact()).thenReturn("010-5678-1234"); - when(applicantService.getApplicantByStudentNo("20210000")).thenReturn(applicant); - - // when - CustomException exception = assertThrows(CustomException.class, () -> { - recruitService.checkResult(request); - }); - - // then - assertEquals(ErrorCode.ARGUMENT_NOT_VALID, exception.getErrorCode()); - verify(recruitRepository, times(1)).findByKey(ConfigKey.DOCUMENT_PASS_ANNOUNCEMENT); - verify(applicantService, times(1)).getApplicantByStudentNo("20210000"); - } - @Test @DisplayName("면접 일정 생성 - 성공") void createInterviewSlots_success() {