Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



C# is in a similar position, classes aren't final by default but their methods are.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: