Hi, what’s the best mock library for Kotlin? What ...
# announcements
f
Hi, what’s the best mock library for Kotlin? What is the best way to mock that:
Copy code
object ContextManagerFactory {
    fun get(): ContextManager {
r
Mockito 2
or perhaps powermock for that senario. since its somewhat like a static
f
thanks, is it able to mock suspend function?
r
as in courutines?
i think as long as its public, suspend is not a access modifier so I can’t see why not
im not 100% sure , tho never tried. but isolation frameworks work as long as the function or method provided can be overriden
👍 1
f
thanks 😉 lets try that