Never say final: mocking Kotlin classes in unit tests
Danny Preussler
213

Hi Danny,

do you may be know how to solve next problem:

interface Test{
var testVar
}
@Mock
lateinit var test: Test
@Test
fun test{
val something = SomeClass(test)
assertEquals(test.testVar, someValue)
}

in this case we are not able to test var inside interface.
Could you help with that?

Show your support

Clapping shows how much you appreciated Sergey Lebedev’s story.