4 ms·
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 extens
by relics443 9y ago
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.
- tybit 9y agoC# is in a similar position, classes aren't final by default but their methods are.