Home
last modified time | relevance | path

Searched refs:mockResponse (Results 1 – 5 of 5) sorted by relevance

/external/guice/extensions/servlet/test/com/google/inject/servlet/
DServletPipelineRequestDispatcherTest.java133 final HttpServletResponse mockResponse = createMock(HttpServletResponse.class); in testForwardToManagedServlet() local
140 expect(mockResponse.isCommitted()).andReturn(false); in testForwardToManagedServlet()
142 mockResponse.resetBuffer(); in testForwardToManagedServlet()
172 replay(injector, binding, requestMock, mockResponse, mockBinding); in testForwardToManagedServlet()
181 dispatcher.forward(requestMock, mockResponse); in testForwardToManagedServlet()
185 verify(injector, requestMock, mockResponse, mockBinding); in testForwardToManagedServlet()
213 final HttpServletResponse mockResponse = createMock(HttpServletResponse.class); in forwardToManagedServletFailureOnCommittedBuffer() local
215 expect(mockResponse.isCommitted()).andReturn(true); in forwardToManagedServletFailureOnCommittedBuffer()
242 replay(injector, binding, mockRequest, mockResponse, mockBinding); in forwardToManagedServletFailureOnCommittedBuffer()
253 dispatcher.forward(mockRequest, mockResponse); in forwardToManagedServletFailureOnCommittedBuffer()
[all …]
/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/internal/huc/
DCacheAdapterTest.java252 private URL configureServer(MockResponse mockResponse) throws Exception { in configureServer() argument
253 server.enqueue(mockResponse); in configureServer()
258 private URL configureHttpsServer(MockResponse mockResponse) throws Exception { in configureHttpsServer() argument
260 server.enqueue(mockResponse); in configureHttpsServer()
DResponseCacheTest.java184 MockResponse mockResponse = new MockResponse() in assertCached() local
191 mockResponse.addHeader("Proxy-Authenticate: Basic realm=\"protected area\""); in assertCached()
193 mockResponse.addHeader("WWW-Authenticate: Basic realm=\"protected area\""); in assertCached()
195 server.enqueue(mockResponse); in assertCached()
231 MockResponse mockResponse = new MockResponse() in testResponseCaching() local
235 transferKind.setBody(mockResponse, "I love puppies but hate spiders", 1); in testResponseCaching()
236 server.enqueue(mockResponse); in testResponseCaching()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DCacheTest.java158 MockResponse mockResponse = new MockResponse() in assertCached() local
165 mockResponse.addHeader("Proxy-Authenticate: Basic realm=\"protected area\""); in assertCached()
167 mockResponse.addHeader("WWW-Authenticate: Basic realm=\"protected area\""); in assertCached()
170 mockResponse.setBody(""); // We forbid bodies for 204 and 205. in assertCached()
172 server.enqueue(mockResponse); in assertCached()
211 MockResponse mockResponse = new MockResponse() in testResponseCaching() local
215 transferKind.setBody(mockResponse, "I love puppies but hate spiders", 1); in testResponseCaching()
216 server.enqueue(mockResponse); in testResponseCaching()
500 MockResponse mockResponse = new MockResponse(); in testServerPrematureDisconnect() local
501 transferKind.setBody(mockResponse, "ABCDE\nFGHIJKLMNOPQRSTUVWXYZ", 16); in testServerPrematureDisconnect()
[all …]
DURLConnectionTest.java702 MockResponse mockResponse = new MockResponse().setBody("this response comes via a proxy"); in testConnectViaProxy() local
703 server.enqueue(mockResponse); in testConnectViaProxy()
775 MockResponse mockResponse = new MockResponse(); in contentDisagreesWithChunkedHeaderBodyTooLong() local
776 mockResponse.setChunkedBody("abc", 3); in contentDisagreesWithChunkedHeaderBodyTooLong()
777 Buffer buffer = mockResponse.getBody(); in contentDisagreesWithChunkedHeaderBodyTooLong()
779 mockResponse.setBody(buffer); in contentDisagreesWithChunkedHeaderBodyTooLong()
780 mockResponse.clearHeaders(); in contentDisagreesWithChunkedHeaderBodyTooLong()
781 mockResponse.addHeader("Transfer-encoding: chunked"); in contentDisagreesWithChunkedHeaderBodyTooLong()
783 server.enqueue(mockResponse); in contentDisagreesWithChunkedHeaderBodyTooLong()
789 MockResponse mockResponse = new MockResponse(); in contentDisagreesWithChunkedHeaderBodyTooShort() local
[all …]