Last active
February 4, 2018 18:02
-
-
Save mohsenoid/9b25e5a1375742d281b4546021fe552e to your computer and use it in GitHub Desktop.
Sample TestApplication class https://hackernoon.com/yet-another-mvp-article-part-5-writing-test-using-a-mixture-of-dagger-and-espresso-15c638182706
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mirhoseini.marvel; | |
/*...*/ | |
public class MarvelTestApplication extends MarvelApplicationImpl { | |
@Override | |
public ApplicationTestComponent createComponent() { | |
return DaggerApplicationTestComponent | |
.builder() | |
.androidModule(new AndroidModule(this)) | |
// replace Api Module with Mocked one | |
.apiModule(new ApiTestModule()) | |
.build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment