Class FakeHttpLayer.RequestMatcherResponseRule
java.lang.Object
org.robolectric.shadows.httpclient.FakeHttpLayer.RequestMatcherResponseRule
- All Implemented Interfaces:
HttpEntityStub.ResponseRule
- Enclosing class:
- FakeHttpLayer
public static class FakeHttpLayer.RequestMatcherResponseRule extends Object implements HttpEntityStub.ResponseRule
-
Constructor Summary
Constructors Constructor Description RequestMatcherResponseRule(RequestMatcher requestMatcher, IOException ioException)
RequestMatcherResponseRule(RequestMatcher requestMatcher, List<? extends org.apache.http.HttpResponse> responses)
RequestMatcherResponseRule(RequestMatcher requestMatcher, org.apache.http.HttpException httpException)
RequestMatcherResponseRule(RequestMatcher requestMatcher, org.apache.http.HttpResponse responseToGive)
-
Method Summary
Modifier and Type Method Description org.apache.http.HttpResponse
getResponse()
boolean
matches(org.apache.http.HttpRequest request)
-
Constructor Details
-
RequestMatcherResponseRule
public RequestMatcherResponseRule(RequestMatcher requestMatcher, org.apache.http.HttpResponse responseToGive) -
RequestMatcherResponseRule
-
RequestMatcherResponseRule
public RequestMatcherResponseRule(RequestMatcher requestMatcher, org.apache.http.HttpException httpException) -
RequestMatcherResponseRule
public RequestMatcherResponseRule(RequestMatcher requestMatcher, List<? extends org.apache.http.HttpResponse> responses)
-
-
Method Details
-
matches
public boolean matches(org.apache.http.HttpRequest request)- Specified by:
matches
in interfaceHttpEntityStub.ResponseRule
-
getResponse
- Specified by:
getResponse
in interfaceHttpEntityStub.ResponseRule
- Throws:
org.apache.http.HttpException
IOException
-