Open noloman opened 5 years ago
It seems like a configuration error somewhere, are you importing mockito-android
? Is kotlin all open configured correctly?
yes, I am doing both: mockito-android
and kotlin-all-open
.
When it comes to the TestApplication
where the TestComponent
is, do I need to duplicate it and place it under the androidTest
folder?
Usually the TestApplication
and TestComponent
are only in androidTest
folder. I think there is some configuration error, can you create a minimal project to reproduce it?
Hi,
first of all congratulations and thanks for the library, because to be honest setting up Dagger is really cumbersome.
I'm trying DaggerMock for the first time to mock my dependencies in the instrumented tests, and I'm getting the errors here.
I'm having a fairly simple test just to make sure it works:
and I'm using the
espressoDaggerModule
in the examples but adapted to my project:And the
MainModule
for example is:I tried to use both Kotlin AllOpen plugin and also DexOpener, but I'm always getting the same issue (the one in pastebin). If I remove
@get:Rule val rule = espressoDaggerMockRule()
from the test, it all works (but I can't mock my dependencies of course).Is there anything else I need to do that I've maybe missed? Thanks!