Class TestHttpResponse

  • All Implemented Interfaces:
    org.apache.http.HttpMessage, org.apache.http.HttpResponse

    public class TestHttpResponse
    extends HttpResponseStub
    • Constructor Detail

      • TestHttpResponse

        public TestHttpResponse()
      • TestHttpResponse

        public TestHttpResponse​(int statusCode,
                                String responseBody)
      • TestHttpResponse

        public TestHttpResponse​(int statusCode,
                                String responseBody,
                                org.apache.http.Header... headers)
      • TestHttpResponse

        public TestHttpResponse​(int statusCode,
                                byte[] responseBody,
                                org.apache.http.Header... headers)
    • Method Detail

      • setResponseBody

        protected void setResponseBody​(String responseBody)
      • getStatusLine

        public org.apache.http.StatusLine getStatusLine()
        Specified by:
        getStatusLine in interface org.apache.http.HttpResponse
        Overrides:
        getStatusLine in class HttpResponseStub
      • getEntity

        public org.apache.http.HttpEntity getEntity()
        Specified by:
        getEntity in interface org.apache.http.HttpResponse
        Overrides:
        getEntity in class HttpResponseStub
      • getAllHeaders

        public org.apache.http.Header[] getAllHeaders()
        Specified by:
        getAllHeaders in interface org.apache.http.HttpMessage
        Overrides:
        getAllHeaders in class HttpResponseStub
      • getFirstHeader

        public org.apache.http.Header getFirstHeader​(String s)
        Specified by:
        getFirstHeader in interface org.apache.http.HttpMessage
        Overrides:
        getFirstHeader in class HttpResponseStub
      • getLastHeader

        public org.apache.http.Header getLastHeader​(String s)
        Specified by:
        getLastHeader in interface org.apache.http.HttpMessage
        Overrides:
        getLastHeader in class HttpResponseStub
      • getHeaders

        public org.apache.http.Header[] getHeaders​(String s)
        Specified by:
        getHeaders in interface org.apache.http.HttpMessage
        Overrides:
        getHeaders in class HttpResponseStub
      • addHeader

        public void addHeader​(org.apache.http.Header header)
        Specified by:
        addHeader in interface org.apache.http.HttpMessage
        Overrides:
        addHeader in class HttpResponseStub
      • setHeader

        public void setHeader​(org.apache.http.Header newHeader)
        Specified by:
        setHeader in interface org.apache.http.HttpMessage
        Overrides:
        setHeader in class HttpResponseStub
      • headerIterator

        public org.apache.http.HeaderIterator headerIterator()
        Specified by:
        headerIterator in interface org.apache.http.HttpMessage
        Overrides:
        headerIterator in class HttpResponseStub
      • headerIterator

        public org.apache.http.HeaderIterator headerIterator​(String s)
        Specified by:
        headerIterator in interface org.apache.http.HttpMessage
        Overrides:
        headerIterator in class HttpResponseStub
      • containsHeader

        public boolean containsHeader​(String s)
        Specified by:
        containsHeader in interface org.apache.http.HttpMessage
        Overrides:
        containsHeader in class HttpResponseStub
      • setParams

        public void setParams​(HttpParams httpParams)
        Specified by:
        setParams in interface org.apache.http.HttpMessage
        Overrides:
        setParams in class HttpResponseStub
      • entityContentStreamsHaveBeenClosed

        public boolean entityContentStreamsHaveBeenClosed()