[미션 Day 18] Mock 어노테이션 종류 및 차이점 & BDD 패턴 매치 #9
Open
discphy wants to merge 5 commits intomisson/day16from
Open
Conversation
discphy
commented
Mar 25, 2025
Comment on lines
+9
to
+15
| @BeforeEach | ||
| void setUp() { | ||
| 1-1. 2-1. 3-1. 사용자 생성에 필요한 내용 준비 | ||
| 1-2. 2-2. 3-2. 사용자 생성 | ||
| 1-3. 2-3. 3-5. 게시물 생성에 필요한 내용 준비 | ||
| 1-4. 2-4. 3-6. 게시물 생성 | ||
| } |
Owner
Author
There was a problem hiding this comment.
댓글을 테스트 하기 위해 필요한 사용자 생성 로직과 게시물 생성 로직을 setup 절에 배치
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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절을 통합한 예외 검증이 이루어져야 하기 때문에 다음과 같이 배치하였습니다.