Skip to content

Commit

Permalink
Update Kotlin-Mockito-ArgumentMatcher.md
Browse files Browse the repository at this point in the history
  • Loading branch information
HomoEfficio authored May 12, 2021
1 parent c450515 commit 6c72291
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions Kotlin-Mockito-ArgumentMatcher.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kotlin에서 Mockito 사용 시 주의 사항
# Kotlin에서 Mockito ArgumentMatcher 사용하기

## ArgumentMatcher

Expand Down Expand Up @@ -138,19 +138,5 @@ private fun <T> argMatching(matcher: ArgumentMatcher<T>): T {
}
```

## 자바의 void 메서드 stub 하기

그냥 아래와 같이 Init을 반환하게 하면 되려나 했는데 역시나 안 되더라능

```kotlin
given(worldCommand.delete(id)).willReturn(Unit)
```

다음과 같이 해야한다.

```kotlin
willDoNothing().given(worldCommand).delete(id)
```



0 comments on commit 6c72291

Please sign in to comment.