Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock dependencies in both parent and child component in espresso test? #78

Open
bnvinay92 opened this issue Jul 8, 2018 · 1 comment

Comments

@bnvinay92
Copy link

Is it possible to mock dependencies in both the parent component and child component in an espresso test? Child components are being created using the builder.

@fabioCollini
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants