Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 30 for assertEquals (0.19 sec)

  1. 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)
  2. 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)
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

        val buffer = ByteArray(1024)
        assertFailsWith<IOException> {
          while (responseBody.read(buffer) != -1) {
          }
        }.also { expected ->
          assertEquals(cancelMode == INTERRUPT, Thread.interrupted())
        }
        responseBody.close()
        assertEquals(if (connectionType == H2) 1 else 0, client.connectionPool.connectionCount())
      }
    
      @ParameterizedTest
      @ArgumentsSource(CancelModelParamProvider::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

    import okhttp3.testing.Flaky
    import okhttp3.testing.PlatformRule.Companion.LOOM_PROPERTY
    import okhttp3.testing.PlatformRule.Companion.getPlatformSystemProperty
    import org.junit.jupiter.api.Assertions.assertEquals
    import org.junit.jupiter.api.Assertions.fail
    import org.junit.jupiter.api.extension.AfterEachCallback
    import org.junit.jupiter.api.extension.BeforeEachCallback
    import org.junit.jupiter.api.extension.ExtensionContext
    
    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)
  5. okhttp/src/test/java/okhttp3/internal/http2/HuffmanTest.kt

    import okhttp3.internal.http2.Huffman.encodedLength
    import okio.Buffer
    import okio.ByteString
    import okio.ByteString.Companion.encodeUtf8
    import okio.ByteString.Companion.toByteString
    import org.junit.jupiter.api.Assertions.assertEquals
    import org.junit.jupiter.api.Test
    
    /** Original version of this class was lifted from `com.twitter.hpack.HuffmanTest`.  */
    class HuffmanTest {
      @Test
      fun roundTripForRequestAndResponse() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Jan 04 05:32:07 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt

       * Returns null if the domain is a public suffix or a private address.
       *
       * Here are some examples:
       *
       * ```java
       * assertEquals("google.com", getEffectiveTldPlusOne("google.com"));
       * assertEquals("google.com", getEffectiveTldPlusOne("www.google.com"));
       * assertNull(getEffectiveTldPlusOne("com"));
       * assertNull(getEffectiveTldPlusOne("localhost"));
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  8. 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)
  9. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixDatabaseTest.kt

     */
    package okhttp3.internal.publicsuffix
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNull
    import assertk.assertions.isTrue
    import kotlin.test.assertEquals
    import kotlin.test.assertFailsWith
    import okhttp3.internal.toCanonicalHost
    import okio.Buffer
    import okio.FileSystem
    import okio.GzipSource
    import okio.Path.Companion.toPath
    import okio.buffer
    import okio.use
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        val hostNfcPunycode = "xn--caf-dma.com"
        val hostNfd = "cafeĢ.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)
Back to top