updated mocks to Servlet 2.5 and JSP 2.1 API level
This commit is contained in:
parent
85661c6882
commit
e3cc9237c4
|
|
@ -46,7 +46,7 @@ import org.springframework.util.Assert;
|
|||
|
||||
/**
|
||||
* Mock implementation of the {@link javax.servlet.http.HttpServletRequest}
|
||||
* interface. Supports the Servlet 2.4 API level.
|
||||
* interface. Supports the Servlet 2.5 API level.
|
||||
*
|
||||
* <p>Used for testing the web framework; also useful for testing
|
||||
* application controllers.
|
||||
|
|
@ -447,7 +447,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
|||
return this.parameters.get(name);
|
||||
}
|
||||
|
||||
public Map getParameterMap() {
|
||||
public Map<String, String[]> getParameterMap() {
|
||||
return Collections.unmodifiableMap(this.parameters);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.springframework.web.util.WebUtils;
|
|||
|
||||
/**
|
||||
* Mock implementation of the {@link javax.servlet.http.HttpServletResponse}
|
||||
* interface. Supports the Servlet 2.4 API level.
|
||||
* interface. Supports the Servlet 2.5 API level.
|
||||
*
|
||||
* <p>Used for testing the web framework; also useful for testing
|
||||
* application controllers.
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import javax.servlet.jsp.JspWriter;
|
|||
import javax.servlet.jsp.PageContext;
|
||||
import javax.servlet.jsp.el.ExpressionEvaluator;
|
||||
import javax.servlet.jsp.el.VariableResolver;
|
||||
import javax.el.ELContext;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
|
@ -277,8 +278,12 @@ public class MockPageContext extends PageContext {
|
|||
return new MockExpressionEvaluator(this);
|
||||
}
|
||||
|
||||
public ELContext getELContext() {
|
||||
throw new UnsupportedOperationException("getELContext");
|
||||
}
|
||||
|
||||
public VariableResolver getVariableResolver() {
|
||||
return null;
|
||||
throw new UnsupportedOperationException("getVariableResolver");
|
||||
}
|
||||
|
||||
public HttpSession getSession() {
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ public class MockServletContext implements ServletContext {
|
|||
return MimeTypeResolver.getMimeType(filePath);
|
||||
}
|
||||
|
||||
public Set getResourcePaths(String path) {
|
||||
public Set<String> getResourcePaths(String path) {
|
||||
String actualPath = (path.endsWith("/") ? path : path + "/");
|
||||
Resource resource = this.resourceLoader.getResource(getResourceLocation(actualPath));
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue