- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for assertEquals (0.22 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) -
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-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) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 8.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
server.enqueue(MockResponse(body = "abc")) val request = Request.Builder().url(server.url("/")).build() val response = client.newCall(request).execute() response.use { assertEquals(200, response.code) assertEquals( "CN=localhost", (response.handshake!!.peerCertificates.single() as X509Certificate).subjectDN.name, ) } } private fun enableTls() { client =
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 8.4K bytes - Viewed (0)