Repository navigation
refactor: 유닛테스트를 BDDMockito로 포팅 - #19
Merged
Merged
Conversation
// given 블록 안에 when( 이 와서 같은 단어가 반대 뜻으로 쓰이는 충돌을 없애기 위해 classic Mockito 를 BDDMockito 로 전환한다. 16개 파일, 동작 변경 없음 (476개 통과 유지). - when().thenReturn() -> given().willReturn() - when().thenThrow() -> given().willThrow() - doThrow().when() -> willThrow().given() - verify() -> then().should() - verify(m, never()) -> then(m).should(never()) - verifyNoInteractions() -> then().shouldHaveNoInteractions() - order.verify() -> then().should(order) lenient().when() 과 order.verifyNoMoreInteractions() 는 BDDMockito 에 대응 API 가 없어 classic 을 유지한다.
2 of 5 tasks
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.
🏷️ 작업 유형
📋 변경 사항
// given블록 안에when(이 오던 단어 충돌 제거 — 주석과 코드가 같은 단어를 쓰도록 통일when().thenReturn()given().willReturn()when().thenThrow()given().willThrow()doThrow().when()willThrow().given()verify()then().should()verify(m, never())then(m).should(never())verifyNoInteractions()then().shouldHaveNoInteractions()order.verify()then().should(order)lenient().when()과order.verifyNoMoreInteractions()는 BDDMockito에 대응 API가 없어 classic 유지✅ 테스트
./mvnw test— 476건 통과, 실패 0