Join Slack
Communities
Powered by
How to mock a kotlin extension? I tried the mockit...
# getting-started
f
fstn
10/18/2017, 6:45 AM
How to mock a kotlin extension? I tried the mockito way but it doesn’t work
Copy code
Mockito.`when`(flowNode.getInputParameter(“response”)).thenReturn(“re”)
d
diesieben07
10/18/2017, 7:29 AM
Extension methods behave like static methods, so you probably need something more than just Mockito, which afaik cannot mock static methods.
f
fstn
10/18/2017, 8:38 AM
mmmmh like PowerMock?
d
diesieben07
10/18/2017, 8:53 AM
Seems that can do it, yes.
f
fstn
10/18/2017, 8:53 AM
thanks
@diesieben07
6
Views
Open in Slack
Previous
Next