Hi all, quick question: With MockK, how do I verif...
# mockk
s
Hi all, quick question: With MockK, how do I verify that a specific function of a mock was never called?
Copy code
verify {
  mock.myFunction(any()) wasNot called
}
Doesn't seem to be correct as this is always true, regardless of whether the function was called or not.
Copy code
verify(exactly = 0) {
   mock.myFunction(any))
}
works but is there another syntax when I want to verify calls an non-calls of functions in the same
verify
block?
o
No there is no
There is special syntax to check if mock had no calls
s
You mean
mock wasNot called
?
o
Yes