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

254 views Asked by At

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

verify (exactly = 0) { obj }
1

There are 1 answers

0
cutiko On BEST ANSWER

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 }