[미션 Day 18] Mock 어노테이션 종류 및 차이점 & BDD 패턴 매치 #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📅 미션 일자
✅ 미션 내용
@Mock,@MockBean,@Spy,@SpyBean,@InjectMocks의 차이@BeforeEach절 및 BDD 절에 배치 하기🔗 미션 링크
💭 리뷰 요구사항
@BeforeEach절에는 실제 댓글을 테스트 하기 위해 필요한 사용자 생성 로직과 게시물 생성 로직을 배치하였습니다.given절에 배치했습니다. 또한, "수정할 수 없다"에 대한 테스트이기 때문에when & then절을 통합한 예외 검증이 이루어져야 하기 때문에 다음과 같이 배치하였습니다.