Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.mockobjects.apache.commons.httpclient
Class MockHttpClient  view MockHttpClient download MockHttpClient.java

java.lang.Object
  extended byorg.apache.commons.httpclient.HttpClient
      extended bycom.mockobjects.apache.commons.httpclient.MockHttpClient
All Implemented Interfaces:
com.mockobjects.Verifiable

public class MockHttpClient
extends org.apache.commons.httpclient.HttpClient
implements com.mockobjects.Verifiable


Field Summary
private  com.mockobjects.ExpectationValue body
           
private  com.mockobjects.ExpectationValue httpState
           
private  com.mockobjects.ExpectationValue method
           
private  int statusCode
           
 
Fields inherited from class org.apache.commons.httpclient.HttpClient
 
Constructor Summary
MockHttpClient()
           
 
Method Summary
 int executeMethod(org.apache.commons.httpclient.HttpMethod method)
          Executes the given HTTP method.
 void setExpectedBody(java.lang.String body)
           
 void setExpectedMethod(org.apache.commons.httpclient.HttpMethod method)
           
 void setExpectedState(org.apache.commons.httpclient.HttpState httpState)
           
 void setState(org.apache.commons.httpclient.HttpState httpState)
          Assigns HTTP state for the HttpClient.
 void setupStatusCode(int statusCode)
           
 void verify()
          Throw an AssertionFailedException if any expectations have not been met.
 
Methods inherited from class org.apache.commons.httpclient.HttpClient
executeMethod, executeMethod, getHost, getHostConfiguration, getHttpConnectionManager, getParams, getPort, getState, isStrictMode, setConnectionTimeout, setHostConfiguration, setHttpConnectionFactoryTimeout, setHttpConnectionManager, setParams, setStrictMode, setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

method

private final com.mockobjects.ExpectationValue method

body

private final com.mockobjects.ExpectationValue body

statusCode

private int statusCode

httpState

private com.mockobjects.ExpectationValue httpState
Constructor Detail

MockHttpClient

public MockHttpClient()
Method Detail

setExpectedMethod

public void setExpectedMethod(org.apache.commons.httpclient.HttpMethod method)

setExpectedBody

public void setExpectedBody(java.lang.String body)

executeMethod

public int executeMethod(org.apache.commons.httpclient.HttpMethod method)
Description copied from class: org.apache.commons.httpclient.HttpClient
Executes the given HTTP method.


setupStatusCode

public void setupStatusCode(int statusCode)

setState

public void setState(org.apache.commons.httpclient.HttpState httpState)
Description copied from class: org.apache.commons.httpclient.HttpClient
Assigns HTTP state for the HttpClient.


setExpectedState

public void setExpectedState(org.apache.commons.httpclient.HttpState httpState)

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