Open CluEleSsUK opened 3 years ago
@CluEleSsUK Could you post the test also?
Sorry, I ended up switching things to mockK, so no longer have the test - it was fairly mickey mouse though! Something to the effect of:
val mock = mock(MyInterface::class)
val objectUnderTest = Thing(mock)
given(mock.someFn(any()).thenReturn("1234")
val result = objectUnderTest.start()
assertTrue(result)
Some things I tried:
Sorry I can't provide you any more info! Feel free to close if you think there's nothing more that can be done
I'm trying to mock a simple interface in my Kotlin project, but receiving the following error:
I'm using
org.mockito.kotlin:mockito-kotlin:2.2.10
and my interface is indeed in the same package as the test. I have also tried inline mockmaker