If you pass dependencies in you constructor which are not required
for the test then your class has most likely too many
responsibilities. If all your dependencies are required for the test you have to adapt the test any ways and should not worry about the compiler errors but embrace them since they help you find all the test cases which need update. I would still say it is best practice to have unit tests (not integration tests) avoid the usage of an injector. If you want to use the guice injector in the tests I would recommend to use a testing framework like jukito. On 08/21/2014 12:45 PM, Maatary Okouya
wrote:
-- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-guice+unsubscr...@googlegroups.com. To post to this group, send email to google-guice@googlegroups.com. Visit this group at http://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/53F5E918.6090205%40gmx.ch. For more options, visit https://groups.google.com/d/optout. |
- Module, Test and Mock Maatary Okouya
- Re: Module, Test and Mock Stephan Classen
- Re: Module, Test and Mock Thomas Broyer
- Re: Module, Test and Mock Maatary Okouya
- Re: Module, Test and Mock Stephan Classen
- Re: Module, Test and Mock Maatary Okouya
- Re: Module, Test and Mock Stephan Classen
- Re: Module, Test and Mock Maatary Okouya
- Re: Module, Test and Mock Tavian Barnes