mockito / mockito-kotlin

Using Mockito with Kotlin
MIT License
3.09k stars 198 forks source link

Remove verifyZeroInteractions? #446

Closed rashadsookram closed 2 years ago

rashadsookram commented 2 years ago

I was trying to update to Mockito 4, and I noticed that I was getting NoSuchMethodErrors when using Mockito-Kotlin's verifyZeroInteractions.

After looking into it, it turns out that this was happening because Mockito.verifyZeroInteractions was removed as of Mockito 4, and Mockito-Kotlin hasn't been updated to build against Mockito 4 yet. I also noticed that verifyZeroInteractions has been marked as deprecated in Mockito-Kotlin, but there hasn't been a new release since then.

If there are plans of releasing a Mockito-Kotlin 4 soon, maybe verifyZeroInteractions can be removed? Or if there's going to be another update for 3.x first, maybe the implementation of verifyZeroInteractions can be changed to call through to verifyNoMoreInteractions instead, so that it's usable (but still deprecated) with Mockito 4?

TimvdLippe commented 2 years ago

Ah yes, we should remove it from mockito-kotlin as well. Do you mind sending us a PR?