Created
February 16, 2017 20:11
-
-
Save ralphpina/e6616620e28f3e92cbded61bdd1346c9 to your computer and use it in GitHub Desktop.
injecting dependencies.
This file contains 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
public Builder withClient() { | |
this.testClient = new TestGiphyClient(); | |
return this; | |
} | |
public Builder withUserManager(boolean real) { | |
if (real) { | |
this.userManager = new UserManagerImpl(); | |
} else { | |
this.userManager = new TestUserManager(); | |
} | |
return this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment