Is anyone successfully running an Espresso KoinTes...
# mockk
e
Is anyone successfully running an Espresso KoinTest that injects a mocked (with mockk) ViewModel via stateViewModel? Is there a trick to getting around getTag needing to return SavedStateHandleController? I am using koin 3.0.1 and mock 1.11.0
java.lang.Object_1_Proxy cannot be cast to androidx.lifecycle.SavedStateHandleController
I assume all of the Koin bits of this are irrelevant but included for context just in case.
j
For future reference and anyone else searching - I found the following workaround:
Copy code
every { viewModelMock invoke "getTag" withArguments listOf("androidx.lifecycle.savedstate.vm.tag") } returns null