Hi, I've got code that runs on top of JAX-RS and Guice. All my classes use construction injection. One such class has the following field:
@Context UriInfo uri; that is injected after-the-fact by JAX-RS. When I try unit testing this code I run into a problem because I'm not sure how to inject a mock object in place of "uri". Guice isn't injecting it in the first place. I was thinking of adding UriInfo to the constructor and making it optional but Guice doesn't support that sort of thing. Alternatively I could add a setUri() method to be used exclusively by the test framework but this seems a bit ugly. I'm new to unit testing. I would appreciate some advice. Thank you, Gili --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
