Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for test1 (0.14 sec)

  1. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        }
      }
    
      @Test
      fun failOnBadResponse() {
        server.enqueue(dnsResponse("00"))
        try {
          dns.lookup("google.com")
          fail<Any>()
        } catch (ioe: IOException) {
          assertThat(ioe).hasMessage("google.com")
          assertThat(ioe.cause!!).isInstanceOf<EOFException>()
        }
      }
    
      // TODO GET preferred order - with tests to confirm this
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

    import okhttp3.tls.internal.TlsUtil.localhost
    
    /**
     * OkHttp is usually tested with functional tests: these use public APIs to confirm behavior against
     * MockWebServer. In cases where logic is particularly tricky, we use unit tests. This class makes
     * it easy to get sample values to use in such tests.
     *
     * This class is pretty fast and loose with default values: it attempts to provide values that are
    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)
  3. okhttp/src/test/java/okhttp3/CallTest.kt

    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  4. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

        }
      }
    
      @Test
      fun testUrlConnectionDirect() {
        testRequest {
          val url = URI(mockServer.endpoint + "/person?name=peter").toURL()
    
          val connection = url.openConnection() as HttpURLConnection
    
          assertThat(connection.inputStream.source().buffer().readUtf8()).contains("Peter the person")
        }
      }
    
      @Test
      fun testUrlConnectionPlaintextProxied() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

    import java.net.InetAddress
    import java.net.InetSocketAddress
    import java.net.Proxy
    import java.net.ProxySelector
    import java.net.SocketAddress
    import java.net.URI
    import java.net.UnknownHostException
    import kotlin.test.assertFailsWith
    import okhttp3.Address
    import okhttp3.ConnectionListener
    import okhttp3.FakeDns
    import okhttp3.OkHttpClientTestRule
    import okhttp3.Request
    import okhttp3.Route
    import okhttp3.TestValueFactory
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

      private lateinit var file: File
    
      @BeforeEach
      fun setUp() {
        file = File(tempDir, "test")
      }
    
      @AfterEach
      fun tearDown() {
        executor.shutdown()
      }
    
      @Test
      fun singleSource() {
        val upstream = Buffer()
        upstream.writeUtf8("abcdefghijklm")
        val relay = edit(file, upstream, metadata, 1024)
        val source = relay.newSource()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  7. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        url = server.url("/")
      }
    
      @Test
      fun levelGetter() {
        // The default is NONE.
        assertThat(applicationInterceptor.level).isEqualTo(Level.NONE)
        for (level in Level.entries) {
          applicationInterceptor.setLevel(level)
          assertThat(applicationInterceptor.level).isEqualTo(level)
        }
      }
    
      @Test
      fun setLevelShouldReturnSameInstanceOfInterceptor() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  8. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

    import android.net.http.UrlRequest.Callback
    import android.net.http.UrlRequest.REQUEST_PRIORITY_MEDIUM
    import android.net.http.UrlResponseInfo
    import androidx.test.ext.junit.runners.AndroidJUnit4
    import androidx.test.filters.SdkSuppress
    import androidx.test.platform.app.InstrumentationRegistry
    import java.net.HttpURLConnection
    import java.net.URL
    import java.nio.ByteBuffer
    import java.util.concurrent.CompletableFuture
    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)
  9. okhttp-android/src/test/kotlin/okhttp3/android/RobolectricOkHttpClientTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     *
     */
    package okhttp3.android
    
    import android.app.Application
    import android.content.Context
    import androidx.test.core.app.ApplicationProvider
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNotNull
    import assertk.assertions.isNull
    import java.net.InetAddress
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  10. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

    import okhttp3.internal.closeQuietly
    import okhttp3.testing.PlatformRule
    import okio.ByteString.Companion.toByteString
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.BeforeEach
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.extension.RegisterExtension
    
    class HandshakeCertificatesTest {
      @RegisterExtension
      var platform = PlatformRule()
    
      private lateinit var executorService: ExecutorService
    
    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)
Back to top