Update to current Spring JAR dependencies.

This commit is contained in:
Ben Alex
2005-03-22 11:17:22 +00:00
parent 2b6b81f39a
commit 9f66c0eae9
10 changed files with 155 additions and 27 deletions

View File

@@ -52,9 +52,9 @@ public class MockHttpServletRequest implements HttpServletRequest {
private HttpSession session = new MockHttpSession();
private Map attribMap = new HashMap();
private Map cookiesMap = new HashMap();
private Map headersMap = new HashMap();
private Map paramMap = new HashMap();
private Map cookiesMap = new HashMap();
private Principal principal;
private String contextPath = "";
private String pathInfo; // null for no extra path
@@ -76,12 +76,14 @@ public class MockHttpServletRequest implements HttpServletRequest {
this.queryString = queryString;
}
public MockHttpServletRequest(Map headers, HttpSession session, String queryString, Cookie[] cookies) {
this.queryString = queryString;
public MockHttpServletRequest(Map headers, HttpSession session,
String queryString, Cookie[] cookies) {
this.queryString = queryString;
this.headersMap = headers;
this.session = session;
for (int i = 0; i < cookies.length; i++) {
cookiesMap.put(cookies[i].getName(), cookies[i]);
cookiesMap.put(cookies[i].getName(), cookies[i]);
}
}
@@ -172,6 +174,18 @@ public class MockHttpServletRequest implements HttpServletRequest {
throw new UnsupportedOperationException("mock method not implemented");
}
public String getLocalAddr() {
throw new UnsupportedOperationException("mock method not implemented");
}
public String getLocalName() {
throw new UnsupportedOperationException("mock method not implemented");
}
public int getLocalPort() {
throw new UnsupportedOperationException("mock method not implemented");
}
public Locale getLocale() {
throw new UnsupportedOperationException("mock method not implemented");
}
@@ -246,6 +260,10 @@ public class MockHttpServletRequest implements HttpServletRequest {
throw new UnsupportedOperationException("mock method not implemented");
}
public int getRemotePort() {
throw new UnsupportedOperationException("mock method not implemented");
}
public String getRemoteUser() {
throw new UnsupportedOperationException("mock method not implemented");
}

View File

@@ -53,6 +53,10 @@ public class MockHttpServletResponse implements HttpServletResponse {
throw new UnsupportedOperationException("mock method not implemented");
}
public void setCharacterEncoding(String arg0) {
throw new UnsupportedOperationException("mock method not implemented");
}
public String getCharacterEncoding() {
throw new UnsupportedOperationException("mock method not implemented");
}
@@ -73,6 +77,10 @@ public class MockHttpServletResponse implements HttpServletResponse {
throw new UnsupportedOperationException("mock method not implemented");
}
public String getContentType() {
throw new UnsupportedOperationException("mock method not implemented");
}
public Cookie getCookieByName(String name) {
return (Cookie) cookiesMap.get(name);
}

View File

@@ -1,4 +1,4 @@
/* Copyright 2004 Acegi Technology Pty Limited
/* Copyright 2004, 2005 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -244,6 +244,21 @@ public class FilterInvocationTests extends TestCase {
"mock method not implemented");
}
public String getLocalAddr() {
throw new UnsupportedOperationException(
"mock method not implemented");
}
public String getLocalName() {
throw new UnsupportedOperationException(
"mock method not implemented");
}
public int getLocalPort() {
throw new UnsupportedOperationException(
"mock method not implemented");
}
public Locale getLocale() {
throw new UnsupportedOperationException(
"mock method not implemented");
@@ -299,6 +314,11 @@ public class FilterInvocationTests extends TestCase {
"mock method not implemented");
}
public int getRemotePort() {
throw new UnsupportedOperationException(
"mock method not implemented");
}
public RequestDispatcher getRequestDispatcher(String arg0) {
throw new UnsupportedOperationException(
"mock method not implemented");
@@ -341,6 +361,11 @@ public class FilterInvocationTests extends TestCase {
"mock method not implemented");
}
public void setCharacterEncoding(String arg0) {
throw new UnsupportedOperationException(
"mock method not implemented");
}
public String getCharacterEncoding() {
throw new UnsupportedOperationException(
"mock method not implemented");
@@ -361,6 +386,11 @@ public class FilterInvocationTests extends TestCase {
"mock method not implemented");
}
public String getContentType() {
throw new UnsupportedOperationException(
"mock method not implemented");
}
public void setLocale(Locale arg0) {
throw new UnsupportedOperationException(
"mock method not implemented");