This is good advice in general, but not always practical.
I'm writing an Android app using Kotlin (where everything is final by default).
I use mocking extensively when I test, and I had to choose between making an interface for [almost] everything, or explicitly opening everything. I went for the former.
I know mockito has tools now to deal with final classes, but the last time I tried it, it wasn't working so well (at all) for Android.
I'm writing an Android app using Kotlin (where everything is final by default).
I use mocking extensively when I test, and I had to choose between making an interface for [almost] everything, or explicitly opening everything. I went for the former.
I know mockito has tools now to deal with final classes, but the last time I tried it, it wasn't working so well (at all) for Android.