Im working on implementing Guice in some existing code. I use log4j2 as
logger in that code, so I implemented an injector using this example:
http://code.google.com/p/google-guice/wiki/CustomInjections
I'm injecting my logger in the following way:
clas Test {
@InjectLogger
private Logger logger;
}
This works perfectly, however all of my unit tests break because of logging
statements in the code and no logger injected (thus: nullpointer
exception). Ofcourse I understand why this is, but I dont know the best way
to solve this.
I can obviously add a setter for the logger that I call in my unit test
set-up, but is that realy a proper solution?
--
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].
Visit this group at http://groups.google.com/group/google-guice?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.