Hi, does anyone have a working example of a test using Mockk’s
mockkStatic
? I can’t make it work with Spek. In JUnit
mockkStatic
works fine.
r
raniejade
04/22/2020, 11:04 PM
Hey! Can you share some code, I can take a look later :)
raniejade
04/22/2020, 11:07 PM
Side note, having to mock a static method seems like a code smell to me :P
d
dnowak
04/22/2020, 11:47 PM
Thanks. I will prepare simple test project.
dnowak
04/22/2020, 11:48 PM
I have to integrate with a library that has API based on static methods (below are thread locals).
r
raniejade
05/02/2020, 4:46 AM
Hey @dnowak! Do you still need any help? 🙂
d
dnowak
05/02/2020, 9:51 PM
Hi @raniejade, I tried to recreate the issue in sample project. Everything works fine… I will try again with my original project and let you know about the results.