You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can use [Mockito](https://github.com/mockito/mockito), but the best lib to mock using kolint is [Mockk](https://github.com/mockk/mockk)
201
+
202
+
```kotlin
203
+
val car = mockk<Car>()
204
+
205
+
every { car.drive(Direction.NORTH) } returns Outcome.OK
206
+
207
+
car.drive(Direction.NORTH) // returns OK
208
+
209
+
verify { car.drive(Direction.NORTH) }
210
+
211
+
confirmVerified(car)
212
+
```
213
+
198
214
## References
199
215
200
216
-[Learn the Kotlin programming language](https://developer.android.com/kotlin/learn?gclsrc=aw.ds&gclid=CjwKCAjw9e6SBhB2EiwA5myr9tk-mZhoAytl5-3nJeQ0lgYnyIGcs5GFh9-aN1tDvkwvcrFEAJZdLhoC0lAQAvD_BwE)
0 commit comments