java.lang.Object
org.apache.commons.httpclient.HttpState
com.mockobjects.apache.commons.httpclient.MockHttpState
- All Implemented Interfaces:
- com.mockobjects.Verifiable
- public class MockHttpState
- extends org.apache.commons.httpclient.HttpState
- implements com.mockobjects.Verifiable
| Methods inherited from class org.apache.commons.httpclient.HttpState |
clear, clearCookies, clearCredentials, clearProxyCredentials, getCookiePolicy, getCookies, getCredentials, getCredentials, getProxyCredentials, getProxyCredentials, isAuthenticationPreemptive, setAuthenticationPreemptive, setCookiePolicy, setCredentials, setCredentials, setProxyCredentials, setProxyCredentials, toString |
MockHttpState
public MockHttpState()
addCookie
public void addCookie(org.apache.commons.httpclient.Cookie cookie)
- Description copied from class:
org.apache.commons.httpclient.HttpState
- Adds an HTTP cookie, replacing any existing equivalent cookies.
If the given cookie has already expired it will not be added, but existing
values will still be removed.
addCookies
public void addCookies(org.apache.commons.httpclient.Cookie[] cookie)
- Description copied from class:
org.apache.commons.httpclient.HttpState
- Adds an array of HTTP cookies. Cookies are added individually and
in the given array order. If any of the given cookies has already expired it will
not be added, but existing values will still be removed.
getCookies
public org.apache.commons.httpclient.Cookie[] getCookies()
- Description copied from class:
org.apache.commons.httpclient.HttpState
- Returns an array of cookies that this HTTP
state currently contains.
getCookies
public org.apache.commons.httpclient.Cookie[] getCookies(java.lang.String s1,
int i1,
java.lang.String s2,
boolean b1,
java.util.Date d1)
purgeExpiredCookies
public boolean purgeExpiredCookies()
- Description copied from class:
org.apache.commons.httpclient.HttpState
- Removes all of cookies in this HTTP state
that have expired according to the current system time.
purgeExpiredCookies
public boolean purgeExpiredCookies(java.util.Date date)
- Description copied from class:
org.apache.commons.httpclient.HttpState
- Removes all of cookies in this HTTP state
that have expired by the specified date.
setCredentials
public void setCredentials(java.lang.String string,
org.apache.commons.httpclient.Credentials credentials)
getCredentials
public org.apache.commons.httpclient.Credentials getCredentials(java.lang.String string)
verify
public void verify()
- Description copied from interface:
com.mockobjects.Verifiable
- Throw an AssertionFailedException if any expectations have not been met.
- Specified by:
verify in interface com.mockobjects.Verifiable