Search in sources :

Example 1 with DefaultSessionAttributeStore

use of org.springframework.web.bind.support.DefaultSessionAttributeStore in project spring-framework by spring-projects.

the class ModelFactoryOrderingTests method setup.

@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>());
}
Also used : ModelAndViewContainer(org.springframework.web.method.support.ModelAndViewContainer) MockHttpServletRequest(org.springframework.mock.web.test.MockHttpServletRequest) DefaultSessionAttributeStore(org.springframework.web.bind.support.DefaultSessionAttributeStore) ServletWebRequest(org.springframework.web.context.request.ServletWebRequest) MockHttpServletResponse(org.springframework.mock.web.test.MockHttpServletResponse) Before(org.junit.Before)

Example 2 with DefaultSessionAttributeStore

use of org.springframework.web.bind.support.DefaultSessionAttributeStore in project spring-framework by spring-projects.

the class ModelFactoryTests method setUp.

@Before
public void setUp() throws Exception {
    this.webRequest = new ServletWebRequest(new MockHttpServletRequest());
    this.attributeStore = new DefaultSessionAttributeStore();
    this.attributeHandler = new SessionAttributesHandler(TestController.class, this.attributeStore);
    this.controller = new TestController();
    this.mavContainer = new ModelAndViewContainer();
}
Also used : ModelAndViewContainer(org.springframework.web.method.support.ModelAndViewContainer) MockHttpServletRequest(org.springframework.mock.web.test.MockHttpServletRequest) DefaultSessionAttributeStore(org.springframework.web.bind.support.DefaultSessionAttributeStore) ServletWebRequest(org.springframework.web.context.request.ServletWebRequest) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)2 MockHttpServletRequest (org.springframework.mock.web.test.MockHttpServletRequest)2 DefaultSessionAttributeStore (org.springframework.web.bind.support.DefaultSessionAttributeStore)2 ServletWebRequest (org.springframework.web.context.request.ServletWebRequest)2 ModelAndViewContainer (org.springframework.web.method.support.ModelAndViewContainer)2 MockHttpServletResponse (org.springframework.mock.web.test.MockHttpServletResponse)1