Fabio Collini
Fabio Collini
I was thinking about something different, a method like this one: public DaggerMockRule decorate(Class originalClass, ObjectDecorator decorator) This would be more generic, instead of just creating a spy it allows...
Sorry, I don't get your point but maybe my explanation was not clear. I was saying that a `decorate` object can be useful instead of adding a boolean to create...
Hi, I have implemented it in this commit [a261d93ea5](https://jitpack.io/#fabioCollini/DaggerMock/a261d93ea5), the modification is not too big and I have tried it in some tests. Can you try to use it (just...
Hi, right now I think that the only solution available is to declare all three fields in the test, obviously it's a _decent_ workaround only if there aren't other dependencies....
The instrumentations test are not executed on the jvm so mockito inline is not enough. You need to use kotlin all open or something similar. I think that the reason...
The error is thrown by DaggerMock because internally it uses Mockito. DexOpener should work, maybe you are defining your module in a package that it's not managed by DexOpener. You...
Hi, I have never tried but it should work if you don't use standard Dagger subcomponent. Here you can find an example of a Robolectric test https://github.com/fabioCollini/DaggerMock/blob/cc0b0acd98941cf432dad9f2771e79bc1e54d5c7/RealWorldAppInjector/src/test/java/it/cosenonjaviste/daggermock/robolectric/MainActivityTest.java Let me know...
Hi, using this work around it works but it's not the best way to do it. I tried to implement the same test and it works, you can find it...
Hi, it's possible if you use standard Dagges subcomponent (and not Dagger Android). Here you can find an example https://github.com/fabioCollini/DaggerMock/blob/master/RealWorldApp/src/androidTest/java/it/cosenonjaviste/daggermock/realworldapp/main/MainActivityMockPresenterTest.java
Hi, can you try to add a method to component builder with the `AppModule` as parameter? Something like the two methods in this example: https://github.com/fabioCollini/DaggerMock/blob/master/RealWorldAppInjector/src/main/java/it/cosenonjaviste/daggermock/realworldapp/AppComponent.java