Home
last modified time | relevance | path

Searched refs:FakeHttp (Results 1 – 6 of 6) sorted by relevance

/external/robolectric-shadows/shadows/httpclient/src/test/java/org/robolectric/shadows/httpclient/
DShadowDefaultRequestDirectorTest.java48 FakeHttpLayer fakeHttpLayer = FakeHttp.getFakeHttpLayer(); in setUp_EnsureStaticStateIsReset()
78 FakeHttp.addPendingHttpResponse(200, "a happy response body"); in tearDown_EnsureStaticStateIsReset()
83 FakeHttp.addPendingHttpResponse(new TestHttpResponse(200, "a happy response body")); in shouldGetHttpResponseFromExecute()
93 FakeHttp.addPendingHttpResponse(new TestHttpResponse(200, "a happy response body")); in shouldPreferPendingResponses()
95 FakeHttp.addHttpResponseRule(HttpGet.METHOD_NAME, "http://some.uri", in shouldPreferPendingResponses()
107 FakeHttp.addHttpResponseRule(HttpGet.METHOD_NAME, "http://some.uri", in shouldReturnRequestsByRule()
119 FakeHttp.setDefaultHttpResponse(404, "no such page"); in shouldReturnRequestsByRule_MatchingMethod()
120 FakeHttp.addHttpResponseRule(HttpPost.METHOD_NAME, "http://some.uri", in shouldReturnRequestsByRule_MatchingMethod()
131 FakeHttp.addHttpResponseRule( in shouldReturnRequestsByRule_AnyMethod()
149 FakeHttp.addHttpResponseRule("http://some.uri", testHttpResponse); in shouldReturnRequestsByRule_KeepsTrackOfOpenContentStreams()
[all …]
DFakeHttpTest.java24 assertTrue(FakeHttp.httpRequestWasMade()); in httpRequestWasSent_ReturnsTrueIfRequestWasSent()
29 assertFalse(FakeHttp.httpRequestWasMade()); in httpRequestWasMade_ReturnsFalseIfNoRequestWasMade()
35 assertTrue(FakeHttp.httpRequestWasMade("http://example.com")); in httpRequestWasMade_returnsTrueIfRequestMatchingGivenRuleWasMade()
41 assertFalse(FakeHttp.httpRequestWasMade("http://example.org")); in httpRequestWasMade_returnsFalseIfNoRequestMatchingGivenRuleWasMAde()
45 FakeHttp.addPendingHttpResponse(200, "a happy response body"); in makeRequest()
DAndroidHttpClientTest.java35 FakeHttp.addPendingHttpResponse(200, "foo"); in testExecute()
/external/robolectric-shadows/shadows/httpclient/src/main/java/org/robolectric/shadows/httpclient/
DShadowDefaultRequestDirector.java102 FakeHttp.getFakeHttpLayer().interceptHttpRequests(true); in __constructor__()
151 int requestCount = FakeHttp.getFakeHttpLayer().getSentHttpRequestInfos().size(); in getLatestSentHttpRequestInfo()
152 return FakeHttp.getFakeHttpLayer().getSentHttpRequestInfo(requestCount - 1); in getLatestSentHttpRequestInfo()
162 return FakeHttp.getFakeHttpLayer().getSentHttpRequestInfo(index); in getSentHttpRequestInfo()
169 if (FakeHttp.getFakeHttpLayer().isInterceptingHttpRequests()) { in execute()
170 … return FakeHttp.getFakeHttpLayer().emulateRequest(httpHost, httpRequest, httpContext, realObject); in execute()
172FakeHttp.getFakeHttpLayer().addRequestInfo(new HttpRequestInfo(httpRequest, httpHost, httpContext,… in execute()
175 if (FakeHttp.getFakeHttpLayer().isInterceptingResponseContent()) { in execute()
179 FakeHttp.getFakeHttpLayer().addHttpResponse(response); in execute()
238 FakeHttp.reset(); in reset()
[all …]
DFakeHttp.java11 public class FakeHttp { class
/external/python/apitools/apitools/base/py/
Dbatch_test.py40 class FakeHttp(object): class
49 self.request = FakeHttp.FakeRequest(credentials=credentials)
139 FakeHttp(), sleep_between_polls=0)
198 FakeHttp(), batch_request_callback=_Callback)
265 FakeHttp(), max_batch_size=max_batch_size)
323 FakeHttp(credentials=credentials), sleep_between_polls=0)
552 batch_request._Execute(FakeHttp())