Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for assertEquals (0.17 sec)

  1. mockwebserver/README.md

      chat.loadMore();
      assertEquals("hello, world!", chat.messages());
    
      chat.loadMore();
      chat.loadMore();
      assertEquals(""
          + "hello, world!\n"
          + "sup, bra?\n"
          + "yo dog", chat.messages());
    
      // Optional: confirm that your app made the HTTP requests you were expecting.
      RecordedRequest request1 = server.takeRequest();
      assertEquals("/v1/chat/messages/", request1.getPath());
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  2. okhttp/src/test/java/okhttp3/internal/idn/PunycodeTest.kt

      }
    
      @Test fun overflowMaxCodePoint() {
        assertNull(Punycode.decode("xn--a-b.net"))
        assertNull(Punycode.decode("xn--a-9b.net"))
        assertEquals("a՚.net", Punycode.decode("xn--a-99b.net"))
        assertEquals("a溠.net", Punycode.decode("xn--a-999b.net"))
        assertEquals("a\uD8E2\uDF5C.net", Punycode.decode("xn--a-9999b.net"))
        assertNull(Punycode.decode("xn--a-99999b.net"))
      }
    
      @Test fun dashInPrefix() {
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/OpenJSSETest.kt

        val request = Request(server.url("/"))
    
        val response = client.newCall(request).execute()
    
        response.use {
          assertEquals(200, response.code)
          assertEquals(TlsVersion.TLS_1_3, response.handshake?.tlsVersion)
          assertEquals(Protocol.HTTP_2, response.protocol)
    
          assertThat(response.exchangeAccessor!!.connectionAccessor.socket())
            .isInstanceOf<SSLSocketImpl>()
        }
      }
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  4. regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java

    import org.junit.Test;
    import org.junit.runner.RunWith;
    
    import java.io.IOException;
    import java.security.cert.Certificate;
    import java.security.cert.X509Certificate;
    
    import static org.junit.Assert.assertEquals;
    import static org.junit.Assert.assertTrue;
    
    /**
     * Simple test adaptable to show a failure in older versions of OkHttp
     * or Android SDKs.
     */
    @RunWith(AndroidJUnit4.class)
    public class IssueReproductionTest {
    Java
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jul 26 06:37:08 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  5. regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientHttp2Test.kt

          println("Protocol ${response.version}")
          println("Response ${response.code}")
          println("${response.body.bodyText.substring(0, 20)}...")
    
          Assert.assertEquals(ProtocolVersion("HTTP", 2, 0), response.version)
        }
      }
    }
    
    object LoggingCallback : FutureCallback<SimpleHttpResponse> {
      override fun completed(response: SimpleHttpResponse) {
      }
    
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        val hostNfcPunycode = "xn--caf-dma.com"
        val hostNfd = "café.com"
        val hostNfdPunycode = "xn--cafe-yvc.com"
        assertEquals(hostNfcPunycode, "http://$hostNfc/".toHttpUrl().host)
        assertEquals(hostNfcPunycode, "http://$hostNfcPunycode/".toHttpUrl().host)
        assertEquals(hostNfcPunycode, "http://$hostNfd/".toHttpUrl().host)
        if (isJvm) return // TODO: the rest of this test is broken on JVM platforms.
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 67.9K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt

        assertEquals(3, binarySearch(0, 5) { index -> 7.compareTo(table[index]) })
        assertEquals(4, binarySearch(0, 5) { index -> 9.compareTo(table[index]) })
    
        // Search for misses.
        assertEquals(-1, binarySearch(0, 5) { index -> 0.compareTo(table[index]) })
        assertEquals(-2, binarySearch(0, 5) { index -> 2.compareTo(table[index]) })
        assertEquals(-3, binarySearch(0, 5) { index -> 4.compareTo(table[index]) })
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/SessionReuseTest.kt

        server.enqueue(MockResponse(body = "abc2"))
    
        val request = Request(server.url("/"))
    
        client.newCall(request).execute().use { response ->
          assertEquals(200, response.code)
        }
    
        client.connectionPool.evictAll()
        assertEquals(0, client.connectionPool.connectionCount())
    
        // Force reuse. This appears flaky (30% of the time) even though sessions are reused.
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 6K bytes
    - Viewed (0)
  9. regression-test/src/androidTest/java/okhttp/regression/compare/OkHttpClientTest.java

        Request request = new Request.Builder()
            .url("https://google.com/robots.txt")
            .build();
        try (Response response = client.newCall(request).execute()) {
          assertEquals(200, response.code());
          assertEquals(Protocol.HTTP_2, response.protocol());
        }
      }
    Java
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Sat Nov 14 17:38:22 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  10. regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientTest.kt

        httpClient.close()
      }
    
      @Test fun get() {
        val request = HttpGet("https://google.com/robots.txt")
    
        httpClient.execute(request).use { response ->
          assertEquals(200, response.code)
          // TODO enable ALPN later
          assertEquals(HttpVersion.HTTP_1_1, response.version)
        }
      }
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
Back to top