Thanks to Spring's new MVC Annotations (@Controller, @RequestMapping, @RequestParam etc.) unit testing a Spring controller is now easier than ever before. Still, I had a hard time figuring out how to do this since most of your controller methods will not take a ServletRequest as input. Instead they use a form-backing / command object, a BindingResult and maybe a ModelMap. In a web environment Spring takes care of filling the command object and validation results however in a unit test you will h
More
Give back to creators
Give microdonations when you Like, Favorite & Star.
3 Flattr microdonations from 2 people
-
urbansu...
- +1 others
