org.springframework.social.test.client
Class MockClientHttpResponse

java.lang.Object
  extended by org.springframework.social.test.client.MockClientHttpResponse
All Implemented Interfaces:
ClientHttpResponse, HttpInputMessage, HttpMessage

public class MockClientHttpResponse
extends java.lang.Object
implements ClientHttpResponse

Mock implementation of ClientHttpResponse.


Constructor Summary
MockClientHttpResponse(java.io.InputStream body, HttpHeaders headers, HttpStatus statusCode, java.lang.String statusText)
           
MockClientHttpResponse(java.lang.String body, HttpHeaders headers, HttpStatus statusCode, java.lang.String statusText)
           
 
Method Summary
 void close()
           
 java.io.InputStream getBody()
           
 HttpHeaders getHeaders()
           
 HttpStatus getStatusCode()
           
 java.lang.String getStatusText()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockClientHttpResponse

public MockClientHttpResponse(java.lang.String body,
                              HttpHeaders headers,
                              HttpStatus statusCode,
                              java.lang.String statusText)

MockClientHttpResponse

public MockClientHttpResponse(java.io.InputStream body,
                              HttpHeaders headers,
                              HttpStatus statusCode,
                              java.lang.String statusText)
Method Detail

getBody

public java.io.InputStream getBody()
                            throws java.io.IOException
Specified by:
getBody in interface HttpInputMessage
Throws:
java.io.IOException

getHeaders

public HttpHeaders getHeaders()
Specified by:
getHeaders in interface HttpMessage

getStatusCode

public HttpStatus getStatusCode()
                         throws java.io.IOException
Specified by:
getStatusCode in interface ClientHttpResponse
Throws:
java.io.IOException

getStatusText

public java.lang.String getStatusText()
                               throws java.io.IOException
Specified by:
getStatusText in interface ClientHttpResponse
Throws:
java.io.IOException

close

public void close()
Specified by:
close in interface ClientHttpResponse