Mockito and when method


#1

Hi all,

Mockito is quite interesting for unit testing but unfortunately it uses a when method for stubing. It is a reserved keyword for kotlin. Does anyone has an idea of workaround to use it?

Thanks,

Gaetan


#2

You can use escape symbol:

fun main(args: Array<String>) {   Test().`when`() }

#3

You rocks. I delete my mockito fork on github :p

Gaetan,