Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for SetDefault (0.18 sec)

  1. okhttp/src/test/java/okhttp3/MediaTypeJvmTest.kt

        }
      }
    
      private fun <T> withLocale(
        locale: Locale,
        block: () -> T,
      ): T {
        val previous = Locale.getDefault()
        try {
          Locale.setDefault(locale)
          return block()
        } finally {
          Locale.setDefault(previous)
        }
      }
    
      @Test fun testIllegalCharsetName() {
        val mediaType = parse("text/plain; charset=\"!@#$%^&*()\"")
    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)
  2. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

          object : DelegatingServerSocketFactory(getDefault()) {
            override fun configureServerSocket(serverSocket: ServerSocket): ServerSocket {
              serverSocket.receiveBufferSize = socketBufferSize
              return serverSocket
            }
          }
        client =
          client.newBuilder()
            .socketFactory(
              object : DelegatingSocketFactory(getDefault()) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

      @BeforeEach fun setUp(server: MockWebServer?) {
        this.server = server
      }
    
      @AfterEach fun tearDown() {
        ProxySelector.setDefault(DEFAULT_PROXY_SELECTOR)
        CookieManager.setDefault(DEFAULT_COOKIE_HANDLER)
        ResponseCache.setDefault(DEFAULT_RESPONSE_CACHE)
      }
    
      @Test fun durationDefaults() {
        val client = clientTestRule.newClient()
        assertThat(client.callTimeoutMillis).isEqualTo(0)
    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)
  4. okhttp/src/test/java/okhttp3/internal/authenticator/JavaNetAuthenticatorTest.kt

      private val factory =
        TestValueFactory()
          .apply {
            dns = fakeDns
          }
    
      @BeforeEach
      fun setup() {
        Authenticator.setDefault(recordingAuthenticator)
      }
    
      @AfterEach
      fun tearDown() {
        Authenticator.setDefault(null)
        factory.close()
      }
    
      @Test
      fun testBasicAuth() {
        fakeDns["server"] = listOf(InetAddress.getLocalHost())
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt

        client =
          clientTestRule.newClientBuilder()
            .cache(cache)
            .cookieJar(JavaNetCookieJar(cookieManager))
            .build()
      }
    
      @AfterEach
      fun tearDown() {
        ResponseCache.setDefault(null)
        if (this::cache.isInitialized) {
          cache.delete()
        }
      }
    
      @Test
      fun corruptedCipher() {
        val response =
          testCorruptingCache {
            corruptMetadata {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 6K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/internal/http/HttpDateTest.kt

      @BeforeEach
      fun setUp() {
        originalDefault = TimeZone.getDefault()
        // The default timezone should affect none of these tests: HTTP specified GMT, so we set it to
        // something else.
        TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles"))
      }
    
      @AfterEach
      @Throws(Exception::class)
      fun tearDown() {
        TimeZone.setDefault(originalDefault)
      }
    
      @Test
      @Throws(Exception::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        }
      }
    
      @AfterEach fun tearDown() {
    //    TODO reenable after https://github.com/square/okhttp/issues/8206
    //    fileSystem.checkNoOpenFiles()
        cache.close()
    
        java.net.Authenticator.setDefault(null)
      }
    
      @ParameterizedTest
      @ArgumentsSource(ProtocolParamProvider::class)
      fun get(
        protocol: Protocol,
        mockWebServer: MockWebServer,
      ) {
        setUp(protocol, mockWebServer)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  8. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

          strings.any { it.matches(Regex("[A-Z]+=Entrust.*")) }
        }
      }
    
      private fun startTlsServer(): InetSocketAddress {
        val serverSocketFactory = ServerSocketFactory.getDefault()
        serverSocket = serverSocketFactory.createServerSocket()
        val serverAddress = InetAddress.getByName("localhost")
        serverSocket!!.bind(InetSocketAddress(serverAddress, 0), 50)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

        proxySelector: ProxySelector = this.proxySelector,
      ): Address {
        return Address(
          uriHost = uriHost,
          uriPort = uriPort,
          dns = dns,
          socketFactory = SocketFactory.getDefault(),
          sslSocketFactory = null,
          hostnameVerifier = null,
          certificatePinner = null,
          proxyAuthenticator = proxyAuthenticator,
          proxy = proxy,
          protocols = protocols,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ConnectionSpecTest.kt

        val tlsSpec =
          ConnectionSpec.Builder(true)
            .tlsVersions(TlsVersion.TLS_1_2)
            .supportsTlsExtensions(false)
            .build()
        val socket = SSLSocketFactory.getDefault().createSocket() as SSLSocket
        socket.enabledCipherSuites =
          arrayOf(
            CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256.javaName,
            CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA.javaName,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.7K bytes
    - Viewed (0)
Back to top