Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for mockResponse (0.09 sec)

  1. okhttp/src/test/java/okhttp3/CacheTest.kt

      }
    
      private fun testServerPrematureDisconnect(transferKind: TransferKind) {
        val mockResponse = MockResponse.Builder()
        transferKind.setBody(mockResponse, "ABCDE\nFGHIJKLMNOPQRSTUVWXYZ", 16)
        server.enqueue(truncateViolently(mockResponse, 16).build())
        server.enqueue(
          MockResponse.Builder()
            .body("Request #2")
            .build(),
        )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CallTest.kt

          .isEqualTo("INFO: Callback failure for call to " + server.url("/") + "...")
      }
    
      @Test
      fun connectionPooling() {
        server.enqueue(MockResponse(body = "abc"))
        server.enqueue(MockResponse(body = "def"))
        server.enqueue(MockResponse(body = "ghi"))
        executeSynchronously("/a").assertBody("abc")
        executeSynchronously("/b").assertBody("def")
        executeSynchronously("/c").assertBody("ghi")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        val mockResponse1 = MockResponse.Builder()
        transferKind.setBody(mockResponse1, "ABCDEFGHIJK", 1024)
        server.enqueue(mockResponse1.build())
        val mockResponse2 = MockResponse.Builder()
        transferKind.setBody(mockResponse2, "LMNOPQRSTUV", 1024)
        server.enqueue(mockResponse2.build())
        val call1 = client.newCall(newRequest("/"))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
Back to top