- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for assertEquals (0.07 sec)
-
okhttp/src/test/java/okhttp3/JSSETest.kt
val response = client.newCall(request).execute() response.use { assertEquals(200, response.code) if (PlatformVersion.majorVersion > 11) { assertEquals(TlsVersion.TLS_1_3, response.handshake?.tlsVersion) } if (PlatformVersion.majorVersion > 8) { assertEquals(Protocol.HTTP_2, response.protocol) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 5.4K 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(),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3K 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 =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 8.4K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/OkHttpClientTest.kt
import okhttp3.internal.platform.Platform.Companion.get import okhttp3.internal.proxy.NullProxySelector import okhttp3.testing.PlatformRule import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotSame import org.junit.jupiter.api.Assertions.assertSame import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 31 17:16:15 UTC 2024 - 13.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CertificatePinnerTest.kt
CertificatePinner.Pin( "**.example.co.uk", "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", ) assertEquals( "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=".decodeBase64(), pin.hash, ) assertEquals("sha256", pin.hashAlgorithm) assertEquals("**.example.co.uk", pin.pattern) Assertions.assertTrue(pin.matchesHostname("www.example.co.uk"))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.9K 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!! } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 24 13:19:43 UTC 2024 - 6.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MediaTypeGetTest.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3 import kotlin.test.assertEquals import kotlin.test.assertFailsWith import okhttp3.MediaType.Companion.toMediaType open class MediaTypeGetTest : MediaTypeTest() { override fun parse(string: String): MediaType = string.toMediaType()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MediaTypeTest.kt
assertEquals("text", mediaType.type) assertEquals("plain", mediaType.subtype) assertEquals("UTF-8", mediaType.charsetName()) assertEquals("utf-8", mediaType.parameter("charset")) assertEquals("1", mediaType.parameter("a")) assertEquals("2", mediaType.parameter("b")) assertEquals("3", mediaType.parameter("c")) assertEquals("utf-8", mediaType.parameter("CHARSET"))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.5K 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
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 27K bytes - Viewed (0)