https://kotlinlang.org logo
Title
o

oleksiyp

11/08/2017, 2:37 PM
btw I think #kotlin should have very strong focus on testing tools, so that it's easy for Java dev to try it and benefit from having DSLs for testing. So it should be really Kotlin frameworks, no such stuff like "final" issue(kotlin really can allow to run tests with special option, not plugin), e.t.c. up to the approach when you counting clicks till writing first tests for existing Java/Maven/gradle project
d

diego-gomez-olvera

11/08/2017, 3:05 PM
It's possible to mock
final
classes https://antonioleiva.com/mockito-2-kotlin/
o

oleksiyp

11/08/2017, 3:07 PM
I didnt say its im-possible. Ive get through all this mechanisms in Mockito and PowerMock
d

diego-gomez-olvera

11/08/2017, 3:09 PM
what is your main concern, having a relatively easy way to do with Mockito?
e

evanchooly

11/08/2017, 3:11 PM
i personally find mocks to be code smells. i prefer dependency injection with testing modules to provide any stubs i need.
o

oleksiyp

11/08/2017, 3:12 PM
This approach works only if you can retransform classes in JVM, so works on last JVMs and only if JDK installed. Which is may be fine. Stills looks more like a workaround
Great that you dont use mocks :-) i dont use test modules
n

napperley

11/09/2017, 1:03 AM
Kotlin Test (https://github.com/kotlintest/kotlintest) is an excellent option for Kotlin testing (does more than Unit Testing).