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

Javier

09/01/2020, 12:04 PM
Hello I have a problem trying to mock a private method in a sealed class,
io.mockk.MockKException: can't find function someMethod() for dynamic call
Copy code
sealed class SomeSealed {
    private fun someMethod() = ...

    data class SomeData() : SomeSealed()
}
Is there any way to get it working without adding the private method to every data class?
26 Views