Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 154 for assertThat (4.53 sec)

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

            .build()
        assertThat(body.boundary).isEqualTo("123")
        assertThat(body.type).isEqualTo(MultipartBody.MIXED)
        assertThat(body.contentType().toString())
          .isEqualTo("multipart/mixed; boundary=123")
        assertThat(body.parts.size).isEqualTo(1)
        assertThat(body.contentLength()).isEqualTo(33L)
        val buffer = Buffer()
        body.writeTo(buffer)
        assertThat(body.contentLength()).isEqualTo(buffer.size)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ConnectionSpecTest.kt

        val set: MutableSet<Any> = CopyOnWriteArraySet()
        assertThat(set.add(ConnectionSpec.MODERN_TLS)).isTrue()
        assertThat(set.add(ConnectionSpec.COMPATIBLE_TLS)).isTrue()
        assertThat(set.add(ConnectionSpec.CLEARTEXT)).isTrue()
        assertThat(set.add(allTlsVersions)).isTrue()
        assertThat(set.add(allCipherSuites)).isTrue()
        allCipherSuites.hashCode()
        assertThat(allCipherSuites.equals(null)).isFalse()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

        hpackWriter!!.writeHeaders(headerBlock)
        assertThat(bytesOut).isEqualTo(bytesIn)
        assertThat(hpackWriter!!.headerCount).isEqualTo(1)
        val entry = hpackWriter!!.dynamicTable[hpackWriter!!.dynamicTable.size - 1]!!
        checkEntry(entry, "custom-key", "custom-header", 55)
        hpackReader!!.readHeaders()
        assertThat(hpackReader!!.headerCount).isEqualTo(1)
        assertThat(hpackReader!!.getAndResetHeaderList()).isEqualTo(headerBlock)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 38.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/InterceptorTest.kt

        assertThat(request.header("User-Agent")).isNull()
        assertThat(request.header("Host")).isNull()
        assertThat(request.header("Accept-Encoding")).isNull()
    
        // No extra headers in the application's response.
        val response = client.newCall(request).execute()
        assertThat(request.header("Content-Encoding")).isNull()
        assertThat(response.body.string()).isEqualTo("abcabcabc")
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/HandshakeTest.kt

          )
    
        assertThat(handshake.tlsVersion).isEqualTo(TlsVersion.TLS_1_3)
        assertThat(handshake.cipherSuite).isEqualTo(CipherSuite.TLS_AES_128_GCM_SHA256)
        assertThat(handshake.peerCertificates).containsExactly(
          serverCertificate.certificate,
          serverIntermediate.certificate,
        )
        assertThat(handshake.localPrincipal).isNull()
        assertThat(handshake.peerPrincipal)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        client.webSocket!!.close(1000, "Hello!")
        assertThat(client.webSocket!!.close(1000, "Hello!")).isFalse()
        assertThat(client.webSocket!!.send("Hello!")).isFalse()
      }
    
      @Test
      fun clientCloseWith0Fails() {
        assertFailsWith<IllegalArgumentException> {
          client.webSocket!!.close(0, null)
        }.also { expected ->
          assertThat("Code must be in range [1000,5000): 0")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/UtilTest.kt

        assertThat(socket.isHealthy(socketSource)).isTrue()
    
        serverSocket.close()
        assertThat(socket.isHealthy(socketSource)).isFalse()
      }
    
      @Test
      fun testDurationTimeUnit() {
        assertThat(checkDuration("timeout", 0, TimeUnit.MILLISECONDS)).isEqualTo(0)
        assertThat(checkDuration("timeout", 1, TimeUnit.MILLISECONDS)).isEqualTo(1)
    
        assertThat(
          assertThrows<IllegalStateException> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

            .build()
    
        executeSynchronously(request)
          .assertFailureMatches("stream was reset: REFUSED_STREAM")
    
        assertThat(client.routeDatabase.failedRoutes).isEmpty()
        assertThat(server1.requestCount).isEqualTo(1)
        assertThat(server2.requestCount).isEqualTo(0)
    
        assertThat(clientTestRule.recordedConnectionEventTypes()).containsExactly(
          "ConnectStart",
          "ConnectEnd",
          "ConnectionAcquired",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("hello from IPv4")
    
        // In the process we made one successful connection attempt.
        assertThat(listener.recordedEventTypes().filter { it == "ConnectStart" }).hasSize(2)
        assertThat(listener.recordedEventTypes().filter { it == "ConnectFailed" }).hasSize(1)
        assertThat(listener.recordedEventTypes().filter { it == "ConnectEnd" }).hasSize(1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/DispatcherTest.kt

        assertThat(dispatcher.queuedCalls()).isEmpty()
        assertThat(a1.isExecuted()).isTrue()
        assertThat(a1.isCanceled()).isFalse()
        assertThat(a2.isExecuted()).isTrue()
        assertThat(a2.isCanceled()).isTrue()
        assertThat(a3.isExecuted()).isFalse()
        assertThat(a3.isCanceled()).isTrue()
        assertThat(a4.isExecuted()).isFalse()
        assertThat(a4.isCanceled()).isFalse()
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
Back to top