consistent mock behavior

This commit is contained in:
Juergen Hoeller
2009-01-19 23:35:42 +00:00
parent d950b56999
commit 8af66c83ad
28 changed files with 207 additions and 104 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import javax.el.ELContext;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
@@ -34,7 +35,6 @@ 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;
@@ -279,11 +279,11 @@ public class MockPageContext extends PageContext {
}
public ELContext getELContext() {
throw new UnsupportedOperationException("getELContext");
return null;
}
public VariableResolver getVariableResolver() {
throw new UnsupportedOperationException("getVariableResolver");
return null;
}
public HttpSession getSession() {
@@ -291,7 +291,7 @@ public class MockPageContext extends PageContext {
}
public Object getPage() {
throw new UnsupportedOperationException("getPage");
return this;
}
public ServletRequest getRequest() {
@@ -303,7 +303,7 @@ public class MockPageContext extends PageContext {
}
public Exception getException() {
throw new UnsupportedOperationException("getException");
return null;
}
public ServletConfig getServletConfig() {