Replies: 1 comment
-
전자가 나아보입니다! 저도 이 방식이 될 지를 몰랐는데, 좋은 방식인 것 같아요. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
테스트에서 ErrorCode 검증 방식 논의
배경
ErrorCode를 포함한 예외 검증 시 두 가지 방식이 혼용되고 있음. 코드 통일성과 가독성 확보를 위해 어느 방식으로 통일할지 논의 필요.
1.
assertThatThrownBy
+hasMessageContaining
방식⸻
2.
assertThrows
+assertThat
방식⸻
결론
• 예: ErrorCode 자체를 명시적으로 비교할지, message 포함 여부로 간접 검증할지
Beta Was this translation helpful? Give feedback.
All reactions