Code example for ServletWebRequest

0
 
	@Before 
	public void setUp() throws Exception { 
		paramErrors = new MethodParameter(getClass().getDeclaredMethod("handle", Errors.class), 0); 
		bindingResult = new WebDataBinder(new Object(), "attr").getBindingResult(); 
		webRequest = new ServletWebRequest(new MockHttpServletRequest()); 
	} 
 
	@Test 
	public void supports() throws Exception { 
		resolver.supportsParameter(paramErrors); 
	} 
 
	@Test 
	public void bindingResult() throws Exception { 
		ModelAndViewContainer mavContainer = new ModelAndViewContainer(); 
		mavContainer.addAttribute("ignore1", "value1"); 
		mavContainer.addAttribute("ignore2", "value2"); 
		mavContainer.addAttribute("ignore3", "value3"); 
		mavContainer.addAttribute("ignore4", "value4");