If you don't inject the injector anyway, wouldn't creating the injector (in Stage.TOOL if you want to prevent creating anything) cover this?
sam On Thu, Oct 16, 2014 at 2:00 PM, Kevin Burton <[email protected]> wrote: > Is there an easy way to require that your dependencies are met without > actually having to call getInstance or have an instance of an object? > > This should be easy since I can build a graph of the connections between > Classes. > > Some of my instances require complex init and external dependencies like > Cassandra and ActiveMQ... I don't to have to require these in my unit tests > because they are hefty. > > I'd like to inject Session which is a Cassandra object bound to a given > connection... but of course I would have to create that object manually. > > Is there a cleaner way to do this? > > This way I could have some basic tests for production bindings to make > sure the bindings are complete and all dependencies met. > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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/1e68a134-5614-446f-9463-6a500c8f7ca2%40googlegroups.com > <https://groups.google.com/d/msgid/google-guice/1e68a134-5614-446f-9463-6a500c8f7ca2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/CAJEBNUfMwbXXmZujWGterv7Rb%3DsRM5Mftcexme20Ch22yn9Uew%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
