- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for assertEquals (0.21 sec)
-
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 May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 17 15:34:10 GMT 2023 - 5K bytes - Viewed (1) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.3K bytes - Viewed (0) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 3.7K bytes - Viewed (0) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.6K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
assertTrue(results.session_ticket_supported) assertEquals("Probably Okay", results.rating) // TODO map to expected versions automatically, test ignored for now. Run manually. assertEquals("TLS 1.3", results.tls_version) assertEquals(0, results.insecure_cipher_suites.size) assertEquals(TlsVersion.TLS_1_3, response.handshake?.tlsVersion) assertEquals(Protocol.HTTP_2, response.protocol) } @Test
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 27K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/MediaTypeJvmTest.kt
if (isAndroid) { // Charset.forName("'utf-8'") == UTF-8 assertEquals("UTF-8", mediaType.charsetName()) } else { assertNull(mediaType.charset()) } } @Test fun testDefaultCharset() { val noCharset = parse("text/plain") assertEquals( "UTF-8", noCharset.charset(Charsets.UTF_8)!!.name(), ) assertEquals( "US-ASCII", noCharset.charset(Charsets.US_ASCII)!!.name(),
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) -
okhttp/src/test/java/okhttp3/CertificatePinnerKotlinTest.kt
val pin = Pin( "**.example.co.uk", "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", ) assertEquals("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=".decodeBase64(), pin.hash) assertEquals("sha256", pin.hashAlgorithm) assertEquals("**.example.co.uk", pin.pattern) assertTrue(pin.matchesHostname("www.example.co.uk")) assertTrue(pin.matchesHostname("gopher.example.co.uk"))
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 8.1K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt
val completableFuture = execute(engine, executor, "https://google.com/robots.txt") try { val response = completableFuture.get(10, TimeUnit.SECONDS) assertEquals(200, response.code) assertEquals("h3", response.negotiatedProtocol) assertTrue(response.content.contains("Disallow")) } catch (ee: ExecutionException) { throw ee.cause?.cause ?: ee.cause!! } }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 24 13:19:43 GMT 2024 - 6.2K bytes - Viewed (0) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 67.9K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/CertificatesTest.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.tls import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test class CertificatesTest { @Test fun testRoundtrip() { val certificateString = """ -----BEGIN CERTIFICATE-----
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)