Hi everyone! anyone knows if it is possible to mock a kotlin function with mockito?
a
Alexander Khyzhun
12/18/2017, 2:19 PM
why not?
s
sindrenm
12/18/2017, 2:23 PM
Since Kotlin classes and functions are closed by default and Mockito uses inheritance to mock and stub. However, there are ways to make it work. You might want to have a look at mockito-kotlin:
https://github.com/nhaarman/mockito-kotlin
c
carmelo.iriti
12/18/2017, 2:48 PM
@sindrenm thank you a lot!! 🤓
carmelo.iriti
12/18/2017, 2:49 PM
Hi @Alexander Khyzhun, I was asking if it is possible
carmelo.iriti
12/18/2017, 2:50 PM
@Alexander Khyzhun, if you have the answer, please could you share it?