tags:

views:

183

answers:

0

I'a using spring 3.0 and I want to test my Spring controller using MockHttpServletRequest and MockHttpServletResponse. My controller is configured using annotations, so it has no method that takes HttpServletRequest and HttpServletResponse params. The only way is to setup DispatcherServlet properly and call service method. The problem is that Spring don't make any mappings for my controller. In web container environment all works fine. I tried both solutions from forum.springsource.org/showthread.php?t=11753 and www.vijedi.net/2009/integration-testing-spring-mvc-annotated-controllers/. Result was the same. Any ideas?