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 14fa5ac commit 29b59b0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Kotlin-Mockito-ArgumentMatcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,19 @@ 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 29b59b0

Please sign in to comment.