[Android]some mocking features work only on Android P+

One of my colleagues told me Mockk. The library is pure Kotlin mocking library. An interesting thing for me is Android instrumentation support.

I had a question when I saw that why Android P was a limitation. Since it provide mocking feature for final classes / objects in instrumentation tests.

I investigated a bit and I found interesting issues. So I left them here for my note.

Mokito

Dexmaker

 

BTW, Dexmaker has been provided mocking final classes/methods with Mokito on Android P. We can use the feature with below.

Thanks for the fixing and improvements.

2 Comments

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.