https://kotlinlang.org logo
#test
Title
# test
k

khanhbkqt

10/16/2017, 9:23 AM
Hi there! Anyone has tried Kotlin with mockito? I called verify method on a mocked object. But it invokes the implementation then I got error. Any suggestion? Thank you
d

Dave Leeds

10/17/2017, 9:50 PM
@khanhbkqt You’ll need to make sure the class you’re mocking is
open
, and any of its functions that you invoke during the test will also need to be marked
open
. If you don’t, the result is that your actual implementation gets called.
k

khanhbkqt

10/18/2017, 2:31 AM
Thank you, I solved my problem