https://kotlinlang.org logo
#mockk
Title
# mockk
d

dave08

01/21/2019, 3:40 PM
Is it possible to mock a Java static function, there doesn't seem to be any mention of this in the docs?
o

oleksiyp

01/21/2019, 3:40 PM
Yes, I think that's a purpose of mockkStatic
ie it doesnt matter if it is Java or Kotlin
d

dave08

01/21/2019, 3:42 PM
In the docs, it just mentions extension functions, might be nice to have a mention of this...
o

oleksiyp

01/21/2019, 3:42 PM
The thing is that mockkStatic is needed to mock extension functions. But that doesnt matter if you would like to mock static function
d

dave08

01/21/2019, 3:43 PM
Although you're right, conceptually they should be the same, but then, I won't come close to ever understanding how Mockk's inners work so you never know 😉.
o

oleksiyp

01/21/2019, 3:45 PM
Will see
I need to think if it is good to add it or not
👀 1
13 Views