Hello, I am in a bit of a tight spot trying to wri...
# announcements
n
Hello, I am in a bit of a tight spot trying to write a unit test. Is it possible to mock (with Mockito) a Kotlin extension function? I have extension functions for Uri, Uri itself is mocked, but mocking any of its functions seems to be calling an actual implementation....
k
Top level extension functions are stored in a static class named after the file, eg.
Copy code
File: Extentions.Kt

fun Uri.test() {}
will create
ExtensionsKt.test(Uri smth)
- if I remember correctly 😉
n
Aha, thanks