From 1c0386fd158a55be862a2d8236924731b3f5f397 Mon Sep 17 00:00:00 2001 From: donghar Date: Tue, 13 Aug 2024 15:02:19 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EA=B8=B0=EC=A1=B4=EC=9D=98=20CheckedEx?= =?UTF-8?q?ception=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HttpStatusException을 상속받은 RuntimeException으로 변경 --- .../lab/vendor/exception/InvalidCreationException.java | 7 ------- .../woowak/lab/vendor/service/SignUpVendorServiceTest.java | 5 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 src/main/java/camp/woowak/lab/vendor/exception/InvalidCreationException.java diff --git a/src/main/java/camp/woowak/lab/vendor/exception/InvalidCreationException.java b/src/main/java/camp/woowak/lab/vendor/exception/InvalidCreationException.java deleted file mode 100644 index 019da917..00000000 --- a/src/main/java/camp/woowak/lab/vendor/exception/InvalidCreationException.java +++ /dev/null @@ -1,7 +0,0 @@ -package camp.woowak.lab.vendor.exception; - -public class InvalidCreationException extends Exception { - public InvalidCreationException(String message) { - super(message); - } -} diff --git a/src/test/java/camp/woowak/lab/vendor/service/SignUpVendorServiceTest.java b/src/test/java/camp/woowak/lab/vendor/service/SignUpVendorServiceTest.java index cf7498d5..daeb2398 100644 --- a/src/test/java/camp/woowak/lab/vendor/service/SignUpVendorServiceTest.java +++ b/src/test/java/camp/woowak/lab/vendor/service/SignUpVendorServiceTest.java @@ -17,7 +17,6 @@ import camp.woowak.lab.payaccount.repository.PayAccountRepository; import camp.woowak.lab.vendor.domain.Vendor; import camp.woowak.lab.vendor.exception.DuplicateEmailException; -import camp.woowak.lab.vendor.exception.InvalidCreationException; import camp.woowak.lab.vendor.repository.VendorRepository; import camp.woowak.lab.vendor.service.command.SignUpVendorCommand; import camp.woowak.lab.web.authentication.NoOpPasswordEncoder; @@ -36,7 +35,7 @@ class SignUpVendorServiceTest implements VendorFixture { @Test @DisplayName("[성공] Vendor가 저장된다.") - void success() throws InvalidCreationException, DuplicateEmailException { + void success() throws DuplicateEmailException { // given given(passwordEncoder.encode(Mockito.anyString())).willReturn("password"); PayAccount payAccount = createPayAccount(); @@ -56,7 +55,7 @@ void success() throws InvalidCreationException, DuplicateEmailException { @Test @DisplayName("[예외] 가입된 이메일인 경우 예외 발생") - void failWithDuplicateEmail() throws InvalidCreationException, DuplicateEmailException { + void failWithDuplicateEmail() throws DuplicateEmailException { // given given(passwordEncoder.encode(Mockito.anyString())).willReturn("password"); given(payAccountRepository.save(Mockito.any(PayAccount.class))).willReturn(createPayAccount());