Thanks for this. However, I'm not sure if I'd want to get the production module involved in the tests. Actually, in my case, there's really not much use overriding the production module since essentially my test modules are subsets of the actual production module. I create mock objects using Mockito so I don't really use binding for those with Guice. Basically, what I want is to declare an interface and then bind it to a concrete class that I'm going to test. Any dependencies for the actual implementation will be supplied elsewhere.
On Sep 26, 10:16 am, Fred Faber <[email protected]> wrote: > The common solution here is to use: > Modules.override(productionModule) > .with(testModule); > > This lets you test without needing to relax your production bindings. > > Fred -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
