Fabio Collini

Results 57 comments of Fabio Collini
trafficstars

Now it should work, ho do you define the repository in your test? Do you use it in your activity or in a Presenter/ViewModel?

Where do you define the `TravelRepository` object? If you define it in `TravelControlModule` module you should pass it to the super constructor of `CardControlAndroidTestDaggerRule`.

Can you try to add some breakpoints to try the error? Are you sure to use the DaggerMock component in your application? Can you check stacktrace of the repository constructor...

Hi, are you defining the `MainModule` in the `module` attribute of the `@Component` annotation? Removing the definition in the example I get the same error

Can you provide more info? Do you get any error? Which test are you writing, jvm or espresso? Are you using kotlin and are you using a library to open...

Hi, unfortunately if you use Dagger Android you can replace only objects defined in the application component.

It depends on the kind of test you want to write and how you organize the code. Usually I try to keep the presenter/viewModel as simple as possible and move...

If you are using Dagger Android you can't use DaggerMock to replace the presenter/viewModel in an espresso test. However it's not easy to replace it without DaggerMock eather. If you...

Hi, I have some questions to understand better your problem: - what test are you trying to write? An Espresso test that launch the UserProfileActivity? - which objects do you...

Hi, are you using something to open the classes in the tests? You can find more info here: https://github.com/fabioCollini/DaggerMock#kotlin-support Can you explain better the problem? Do you get any errors?