Skip to content

Commit

Permalink
refactor: 오타 수정, 하드 코딩 값 변수로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chomily committed Sep 10, 2020
1 parent 5a17992 commit 4385809
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ void findByIdTest() {
verify(memberRepository).findById(validId);
}

@DisplayName("예외 테스트: 유효하지 않은 아이디로 Member를 요청하면 예외가 발생한")
@DisplayName("예외 테스트: 유효하지 않은 아이디로 Member를 요청하면 예외가 발생한다")
@Test
void findByIdExceptionTest() {
Long invalidId = 100L;
when(memberRepository.findById(invalidId)).thenReturn(Optional.empty());

assertThatThrownBy(() -> memberService.findById(100L))
assertThatThrownBy(() -> memberService.findById(invalidId))
.isInstanceOf(MemberNotFoundException.class)
.hasMessage(invalidId + "에 해당하는 회원을 찾을 수 없습니다.");
}
Expand Down

0 comments on commit 4385809

Please sign in to comment.