Hi, has anyone tried to mock extension functions w...
# android
p
Hi, has anyone tried to mock extension functions with mockito? Internally extension functions are converted to static methods so mockito cannot mock these. Then there is possibly PowerMock or we can provide an interface where the class that implements it, has a method wrapping the call to the extension function. Any suggestions?
d
If you really need to you can do it with mockK.io (I didn't try...)
p
Thanks. I had a great discussion with Andrey Mischenko in the next thread if you want a follow up 😄 We talked about this library as well
👍🏼 1