In Kotlin all classes are final by default. What i...
# announcements
r
In Kotlin all classes are final by default. What is the best practice to make a class
open
only in unit test?
g
rockerhieu: This isa ctually one of my biggest struggles with kotlin (which is saying something because its a pretty small struggle). I haven't pulled the trigger yet, but I'm debating switching to powermock. also for my classes that have an explicit fake implementation, I often just pull out an interface in the same file, and have the class implement it, and make the fake implement that interface somewhere else. Works OK with guice too if you use its
@ImplementedBy
annotation.