Home > Software engineering >  What is the analogue of Mockito.verifyZeroInteractions(obj) in the Mockk library?
What is the analogue of Mockito.verifyZeroInteractions(obj) in the Mockk library?

Time:12-31

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

verify (exactly = 0) { obj }

CodePudding user response:

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 }
  • Related