org.springframework.social.test.client
Class MockClientHttpResponse
java.lang.Object
org.springframework.social.test.client.MockClientHttpResponse
- All Implemented Interfaces:
- org.springframework.http.client.ClientHttpResponse, org.springframework.http.HttpInputMessage, org.springframework.http.HttpMessage
public class MockClientHttpResponse
- extends java.lang.Object
- implements org.springframework.http.client.ClientHttpResponse
Mock implementation of ClientHttpResponse
.
- Author:
- Arjen Poutsma, Lukas Krecan, Craig Walls
Constructor Summary |
MockClientHttpResponse(java.io.InputStream bodyStream,
org.springframework.http.HttpHeaders headers,
org.springframework.http.HttpStatus statusCode,
java.lang.String statusText)
|
MockClientHttpResponse(java.lang.String body,
org.springframework.http.HttpHeaders headers,
org.springframework.http.HttpStatus statusCode,
java.lang.String statusText)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockClientHttpResponse
public MockClientHttpResponse(java.lang.String body,
org.springframework.http.HttpHeaders headers,
org.springframework.http.HttpStatus statusCode,
java.lang.String statusText)
MockClientHttpResponse
public MockClientHttpResponse(java.io.InputStream bodyStream,
org.springframework.http.HttpHeaders headers,
org.springframework.http.HttpStatus statusCode,
java.lang.String statusText)
getBody
public java.io.InputStream getBody()
throws java.io.IOException
- Specified by:
getBody
in interface org.springframework.http.HttpInputMessage
- Throws:
java.io.IOException
getHeaders
public org.springframework.http.HttpHeaders getHeaders()
- Specified by:
getHeaders
in interface org.springframework.http.HttpMessage
getRawStatusCode
public int getRawStatusCode()
throws java.io.IOException
- Specified by:
getRawStatusCode
in interface org.springframework.http.client.ClientHttpResponse
- Throws:
java.io.IOException
getStatusCode
public org.springframework.http.HttpStatus getStatusCode()
throws java.io.IOException
- Specified by:
getStatusCode
in interface org.springframework.http.client.ClientHttpResponse
- Throws:
java.io.IOException
getStatusText
public java.lang.String getStatusText()
throws java.io.IOException
- Specified by:
getStatusText
in interface org.springframework.http.client.ClientHttpResponse
- Throws:
java.io.IOException
close
public void close()
- Specified by:
close
in interface org.springframework.http.client.ClientHttpResponse