Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the analogue of Mockito.verifyZeroInteractions(obj) in the Mockk library?

I want to switch to Mockk, but i cant find analogue of this method in Mockk It doesn't work

verify (exactly = 0) { obj }
like image 909
KramRus Avatar asked Dec 19 '25 18:12

KramRus


1 Answers

The way you are trying it, is missing the method or variable

verify (exactly = 0) { obj.something }

Using the exactly zero approach would require

confirmVerified(obj)

To be sure nothing else was called.

The exact equivalent would be:

verify { obj wasNot Called }
like image 62
cutiko Avatar answered Dec 21 '25 20:12

cutiko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!