Reputation: 595
This is the verify block and was working on java
verify(mockTokenError) {}
And later tried to convert to kotlin
verify{mockTokenError()}
also tried
verify{mockTokenError}
none of them works please let me know solution.
Upvotes: 0
Views: 165
Reputation: 5635
So the verify
block checks all method calls (which were made with the mocked object) that are inside its block.
For example,
val car = mockk<Car>()
verify { car.stop() }
More info - https://mockk.io/#verification-atleast-atmost-or-exactly-times
Upvotes: 1