Rev | Line | |
---|
[1240] | 1 | package gov.va.med.edp.web.controller;
|
---|
| 2 |
|
---|
| 3 | import junit.framework.TestCase;
|
---|
| 4 | import org.springframework.mock.web.MockHttpSession;
|
---|
| 5 | import org.springframework.mock.web.MockHttpServletRequest;
|
---|
| 6 | import org.springframework.mock.web.MockHttpServletResponse;
|
---|
| 7 | import org.springframework.web.context.support.StaticWebApplicationContext;
|
---|
| 8 | import org.springframework.web.servlet.support.WebContentGenerator;
|
---|
| 9 |
|
---|
| 10 | /**
|
---|
| 11 | * TODO: document AbstractControllerTest
|
---|
| 12 | */
|
---|
| 13 | public abstract class AbstractControllerTest extends TestCase {
|
---|
| 14 |
|
---|
| 15 | protected MockHttpSession session = new MockHttpSession();
|
---|
| 16 | protected MockHttpServletRequest request = new MockHttpServletRequest();
|
---|
| 17 | protected MockHttpServletResponse response = new MockHttpServletResponse();
|
---|
| 18 | protected StaticWebApplicationContext webAppContext;
|
---|
| 19 |
|
---|
| 20 | protected void setUp() throws Exception {
|
---|
| 21 | request.setSession(session);
|
---|
| 22 | request.setMethod(WebContentGenerator.METHOD_GET);
|
---|
| 23 |
|
---|
| 24 | webAppContext = new StaticWebApplicationContext();
|
---|
| 25 | webAppContext.setServletContext(session.getServletContext());
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.