Skip to content

Instantly share code, notes, and snippets.

@javiergamarra
Created February 2, 2016 14:05
Show Gist options
  • Save javiergamarra/d04cd8b4a139f818290a to your computer and use it in GitHub Desktop.
Save javiergamarra/d04cd8b4a139f818290a to your computer and use it in GitHub Desktop.
Dagger2 DI

"Don't use Dagger for unit tests; just instantiate the class being tested and pass its dependencies manually."

  • "By building on standard javax.inject annotations (JSR 330), each class is easy to test. You don't need a bunch of boilerplate just to swap the RpcCreditCardService out for a FakeCreditCardService." -- Dagger Home Page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment