@Before public void setUp() throws Exception { this.controller = new TestController(); Method method = TestController.class.getDeclaredMethod("handle"); this.handleMethod = new InvocableHandlerMethod(this.controller, method); method = TestController.class.getDeclaredMethod("handleSessionAttr", String.class); this.handleSessionAttrMethod = new InvocableHandlerMethod(this.controller, method); this.sessionAttributeStore = new DefaultSessionAttributeStore(); this.sessionAttrsHandler = new SessionAttributesHandler(TestController.class, this.sessionAttributeStore); this.webRequest = new ServletWebRequest(new MockHttpServletRequest()); }
@Before public void setup() { this.sessionAttributeStore = new DefaultSessionAttributeStore(); this.webRequest = new ServletWebRequest(new MockHttpServletRequest(), new MockHttpServletResponse()); this.mavContainer = new ModelAndViewContainer(); this.mavContainer.addAttribute("methods", new ArrayList<String>()); }
@Before public void setUp() throws Exception { Class<?> handlerType = handler.getClass(); handleMethod = new InvocableHandlerMethod(handler, handlerType.getDeclaredMethod("handle")); Method method = handlerType.getDeclaredMethod("handleSessionAttr", String.class); handleSessionAttrMethod = new InvocableHandlerMethod(handler, method); sessionAttributeStore = new DefaultSessionAttributeStore(); sessionAttrsHandler = new SessionAttributesHandler(handlerType, sessionAttributeStore); webRequest = new ServletWebRequest(new MockHttpServletRequest()); }
public HandlerMethodInvoker(HandlerMethodResolver methodResolver, WebBindingInitializer bindingInitializer) { this(methodResolver, bindingInitializer, new DefaultSessionAttributeStore(), null, null, null); }
@Before public void setUp() { this.sessionAttributeStore = new DefaultSessionAttributeStore(); this.sessionAttributesHandler = new SessionAttributesHandler(handlerType, sessionAttributeStore); this.request = new ServletWebRequest(new MockHttpServletRequest()); }