On Thu, Jul 1, 2010 at 11:21 PM, charles gay <[email protected]> wrote: > can you post an example of unit testing an httpservlet or > servletFilter, called by the GuiceFilter, like implied in your prevous > post?
I have just published library on Google code which helps in testing such scenarios: http://code.google.com/p/tadedon/ everything is enclosed in tadedon-guice-servlet-mock module. Here are unit tests: http://code.google.com/p/tadedon/source/browse/tadedon-guice-servlet-mock/src/test/java/com/xemantic/tadedon/guice/servlet/mock/UriReturningServletTest.java http://code.google.com/p/tadedon/source/browse/tadedon-guice-servlet-mock/src/test/java/com/xemantic/tadedon/guice/servlet/mock/SessionIdReturningServletTest.java If you would like to test your own Filter, it would require additional interceptor in the library. It would be very nice extension of tadedon library anyway. I will try to write such code in a spare moment. -- "Meaning is differential not referential" kazik 'morisil' pogoda http://www.xemantic.com/ http://blog.xemantic.com/ -- 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.
