From 9821467d62e2b3f700ad5084f280853df2f9462e Mon Sep 17 00:00:00 2001 From: tinon1004 Date: Wed, 27 Mar 2024 14:43:39 +0900 Subject: [PATCH] =?UTF-8?q?test:=20#24=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/service/UserCommandServiceTest.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/test/java/com/ajou/hertz/unit/domain/user/service/UserCommandServiceTest.java b/src/test/java/com/ajou/hertz/unit/domain/user/service/UserCommandServiceTest.java index cbe94c5..61751f1 100644 --- a/src/test/java/com/ajou/hertz/unit/domain/user/service/UserCommandServiceTest.java +++ b/src/test/java/com/ajou/hertz/unit/domain/user/service/UserCommandServiceTest.java @@ -258,22 +258,6 @@ static Stream testDataForCreateNewUserWithKakao() throws Exception { assertThat(updatedUserDto.getPassword()).isEqualTo(newPassword); } - @Test - void 주어진_유저_ID와_새로운_비밀번호로_유저의_비밀번호를_변경한다_존재하지_않는_유저라면_예외가_발생한다() throws Exception { - // given - Long userId = 1L; - String newPassword = "newPwd1234!!"; - given(userQueryService.getById(userId)).willThrow(UserNotFoundByIdException.class); - - // when - Throwable t = catchThrowable(() -> sut.updatePassword(userId, newPassword)); - - // then - then(userQueryService).should().getById(userId); - verifyEveryMocksShouldHaveNoMoreInteractions(); - assertThat(t).isInstanceOf(UserNotFoundByIdException.class); - } - private void verifyEveryMocksShouldHaveNoMoreInteractions() { then(userQueryService).shouldHaveNoMoreInteractions(); then(userRepository).shouldHaveNoMoreInteractions();