Spring's MockHttpServlet(Request|Response) alternatives?
In 'spring-test' there's mock classes for unit testing Servlets, which is very useful. Unfortuately, I do not need any of the other Spring componenets, and do not wish to depend on spring-core in my project.
It is possible to either:
- Use spring-test without depending on spring-core, ... (i.e se开发者_如何学Gover the mocking-classes from spring)?
- Use an alternative mock library with similar functionality?
One option would be the project Mockrunner, which is designed for testing J2EE components such as servlets, and which includes MockHttpServletRequest and Response objects.
精彩评论