Wow! I love this SPI. Thanks for the tip, Sam.
-Adrian jclouds On Aug 21, 2010 8:55 AM, "Sam Berlin" <[email protected]> wrote: What you're doing seems like a good solution. You could also approach the test by using the Elements SPI to get to the private bindings and build a module out of those. Something like this in a test: // if BlueDatabase is a PrivateModule, there'll only ever be one PrivateElements in the returned list PrivateElements pElements = Elements.getElements(new BlueDatabase()).iterator().next(); // Create a module of out the private elements directly Module testModule = Elements.getModule(pElements.getElements()); // Now create an Injector out of that module Injector injector = Guice.createInjector(testModule); sam On Fri, Aug 20, 2010 at 3:52 PM, Jason Winnebeck <[email protected]> wrote: > > Is there a wa... -- 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.
