mockito / mockito-kotlin

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

Should mockito kotlin have transitive dependency to mockito inline? #475

Closed emartynov closed 1 year ago

emartynov commented 1 year ago

Classes by default are closed for extension in Kotlin. For mocking final classes, we have to use mockito inline. So should mockito kotlin have transitive dependency to the kotlin inline?

emartynov commented 1 year ago

This would also make a hard reference to all possible changes in the core mockito.

TimvdLippe commented 1 year ago

mockito-core now uses the inline mockmaker by default per Mockito 5: https://github.com/mockito/mockito/releases/tag/v5.0.0

emartynov commented 1 year ago

@TimvdLippe will mockito kotlin get a new release soon?

TimvdLippe commented 1 year ago

@emartynov if you want to send us a PR that bumps Mockito and makes the CI pass, sure I can publish a new release.

emartynov commented 1 year ago

I'm afraid, except for the version bump, there should be addressed #473 . I will check if I can write a variant of the mock function that covers this situation.

emartynov commented 1 year ago

Ah sorry, I meant #474

elomonaco commented 1 year ago

having this support Mockito 5 would be amazing :)