diff --git a/src/main/kotlin/apply/application/mail/MailReservationService.kt b/src/main/kotlin/apply/application/mail/MailReservationService.kt index 80ef2d8e8..48d763f76 100644 --- a/src/main/kotlin/apply/application/mail/MailReservationService.kt +++ b/src/main/kotlin/apply/application/mail/MailReservationService.kt @@ -25,9 +25,9 @@ class MailReservationService( ) reservations.forEach { mailReservation -> - mailReservation.process() + mailReservation.send() mailService.sendMailsByBcc(MailData(mailReservation.mailMessage), emptyMap()) { - mailReservation.complete() + mailReservation.finish() } } } diff --git a/src/main/kotlin/apply/domain/mail/MailReservation.kt b/src/main/kotlin/apply/domain/mail/MailReservation.kt index 945e74d70..a59d319f5 100644 --- a/src/main/kotlin/apply/domain/mail/MailReservation.kt +++ b/src/main/kotlin/apply/domain/mail/MailReservation.kt @@ -35,11 +35,11 @@ class MailReservation( validateTime(reservationTime) } - fun process() { + fun send() { status = MailReservationStatus.SENDING } - fun complete() { + fun finish() { status = MailReservationStatus.FINISHED } diff --git a/src/test/kotlin/apply/application/mail/MailMessageIntegrationTest.kt b/src/test/kotlin/apply/application/mail/MailMessageIntegrationTest.kt index fdbea0742..af3513e58 100644 --- a/src/test/kotlin/apply/application/mail/MailMessageIntegrationTest.kt +++ b/src/test/kotlin/apply/application/mail/MailMessageIntegrationTest.kt @@ -56,7 +56,7 @@ class MailMessageIntegrationTest( Given("취소하고 싶은 예약 메일이 처리중인 경우") { val mailMessage = mailMessageRepository.save(createReservationMailMessage()) - mailMessage.reservation()?.process() + mailMessage.reservation()?.send() When("메일 예약을 취소하면") { Then("에러가 발생하고 메일 메시지와 예약은 남아있다") { @@ -73,7 +73,7 @@ class MailMessageIntegrationTest( Given("취소하고 싶은 예약 메일이 발송 완료된 경우") { val mailMessage = mailMessageRepository.save(createReservationMailMessage()) - mailMessage.reservation()?.complete() + mailMessage.reservation()?.finish() When("메일 예약을 취소하면") { Then("에러가 발생하고 메일 메시지와 예약은 남아있다") { diff --git a/src/test/kotlin/apply/domain/mail/MailReservationTest.kt b/src/test/kotlin/apply/domain/mail/MailReservationTest.kt index 36638f412..8b409642c 100644 --- a/src/test/kotlin/apply/domain/mail/MailReservationTest.kt +++ b/src/test/kotlin/apply/domain/mail/MailReservationTest.kt @@ -43,14 +43,14 @@ class MailReservationTest : StringSpec({ "예약 메일 전송을 시작한다" { val mailReservation = createMailReservation() - mailReservation.process() + mailReservation.send() mailReservation.status shouldBe MailReservationStatus.SENDING } "예약 메일 전송을 완료한다" { val mailReservation = createMailReservation() - mailReservation.complete() + mailReservation.finish() mailReservation.status shouldBe MailReservationStatus.FINISHED } })