Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 177 for isEqualTo (0.19 sec)

  1. okhttp/src/test/java/okhttp3/internal/UtilTest.kt

        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> {
            checkDuration("timeout", -1, TimeUnit.MILLISECONDS)
          },
        ).hasMessage("timeout < 0")
    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)
  2. okhttp/src/test/java/okhttp3/CommonRequestBodyTest.kt

        val contentType = requestBody.contentType()!!
    
        assertThat(contentType.mediaType).isEqualTo("text/plain; charset=utf-8")
        assertThat(contentType.parameter("charset")).isEqualTo("utf-8")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  3. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

        // First response is still waiting.
        assertThat(firstResponseCode.get()).isEqualTo(0)
        // Second response is done.
        assertThat(secondResponseCode.get()).isEqualTo(200)
        latch.countDown()
        startsFirst.join()
        // And now it's done!
        assertThat(firstResponseCode.get()).isEqualTo(200)
        // (Still done).
        assertThat(secondResponseCode.get()).isEqualTo(200)
      }
    
      private fun buildRequestThread(
        path: String,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  4. samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt

        assertThat(response.code).isEqualTo(200)
        assertThat(response.body.string()).isEqualTo("hello, OkHttp")
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip")
        assertThat(recorded.headers["Connection"]).isEqualTo("Keep-Alive")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  5. samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt

          assertThat(response.code).isEqualTo(200)
          assertThat(EntityUtils.toString(response.entity)).isEqualTo("hello, Apache HttpClient 5.x")
        }
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip, x-gzip, deflate")
        assertThat(recorded.headers["Connection"]).isEqualTo("keep-alive")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/RecordedResponse.kt

      val body: String?,
      val failure: IOException?,
    ) {
      fun assertRequestUrl(url: HttpUrl) =
        apply {
          assertThat(request.url).isEqualTo(url)
        }
    
      fun assertRequestMethod(method: String) =
        apply {
          assertThat(request.method).isEqualTo(method)
        }
    
      fun assertRequestHeader(
        name: String,
        vararg values: String,
      ) = apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

        val call = client.newCall(Request(url))
        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("this was the 2nd request on IPv4")
        assertThat(serverIpv4.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(serverIpv4.takeRequest().sequenceNumber).isEqualTo(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)
  8. okhttp/src/test/java/okhttp3/BouncyCastleTest.kt

        assumeNetwork()
    
        val request = Request.Builder().url("https://mozilla.org/robots.txt").build()
    
        client.newCall(request).execute().use {
          assertThat(it.protocol).isEqualTo(Protocol.HTTP_2)
          assertThat(it.handshake!!.tlsVersion).isEqualTo(TlsVersion.TLS_1_3)
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isFalse
    import assertk.assertions.isNotNull
    import assertk.assertions.isTrue
    import java.io.IOException
    import java.io.InterruptedIOException
    import java.net.HttpURLConnection
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

              url = server.url("/"),
              body = SlowRequestBody,
            ),
          )
    
        call.execute().use { response ->
          assertThat(response.body.string()).isEqualTo("abc")
          assertThat(response.trailers()).isEqualTo(headersOf("caboose", "xyz"))
        }
      }
    
      @Disabled("Follow up with fix in https://github.com/square/okhttp/issues/6853")
      @Test
      fun serverDisconnectsBeforeSecondRequestHttp1() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
Back to top