Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 173 for testy (0.17 sec)

  1. mockwebserver-junit5/src/main/kotlin/mockwebserver3/junit5/internal/MockWebServerExtension.kt

     * Runs MockWebServer for the duration of a single test method.
     *
     * Specifically while junit instances passes into test constructor
     * are typically shares amongst all tests, a fresh instance will be
     * received here. Use with @BeforeAll and @AfterAll, is not supported.
     *
     * There are 3 ids for instances
     * - The test instance default (passed into constructor)
     * - The test lifecycle default (passed into test method, plus @BeforeEach, @AfterEach)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 11 12:12:36 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  2. android-test/src/androidTest/java/okhttp/android/test/sni/SniOverrideTest.kt

    import okhttp3.Request
    import org.junit.jupiter.api.Assumptions.assumeTrue
    import org.junit.jupiter.api.Tag
    import org.junit.jupiter.api.Test
    
    /**
     * Tests for SNI overriding on Android.
     */
    @Tag("Remote")
    class SniOverrideTest {
      var client =
        OkHttpClient.Builder()
          .build()
    
      @Test
      fun getWithCustomSocketFactory() {
        assumeTrue(Build.VERSION.SDK_INT >= 24)
    
        class CustomSSLSocketFactory(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/WebPlatformUrlTest.kt

    import org.junit.jupiter.params.provider.ArgumentsSource
    
    /** Runs the web platform URL tests against Java URL models.  */
    class WebPlatformUrlTest {
      class TestDataParamProvider : SimpleProvider() {
        override fun arguments() = ArrayList<Any>(loadTests())
      }
    
      /** Test how [HttpUrl] does against the web platform test suite.  */
      @ArgumentsSource(TestDataParamProvider::class)
      @ParameterizedTest
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp.android.test
    
    import android.os.Build
    import androidx.test.platform.app.InstrumentationRegistry
    import com.google.android.gms.common.GooglePlayServicesNotAvailableException
    import com.google.android.gms.security.ProviderInstaller
    import com.squareup.moshi.Moshi
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  7. 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)
  8. okhttp/src/test/java/okhttp3/HeadersTest.kt

    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNotEqualTo
    import kotlin.test.Test
    import kotlin.test.assertFailsWith
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.Headers.Companion.toHeaders
    
    class HeadersTest {
      @Test fun ofTrims() {
        val headers = headersOf("\t User-Agent \n", " \r OkHttp ")
        assertThat(headers.name(0)).isEqualTo("User-Agent")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  9. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      }
    
      @Test
      fun portImplicitlyStarts() {
        assertThat(server.port).isGreaterThan(0)
      }
    
      @Test
      fun hostnameImplicitlyStarts() {
        assertThat(server.hostName).isNotNull()
      }
    
      @Test
      fun toProxyAddressImplicitlyStarts() {
        assertThat(server.toProxyAddress()).isNotNull()
      }
    
      @Test
      fun differentInstancesGetDifferentPorts() {
        val other = MockWebServer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  10. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsRecordCodecTest.kt

    import java.net.InetAddress
    import java.net.UnknownHostException
    import kotlin.test.assertFailsWith
    import okhttp3.AsyncDns.Companion.TYPE_A
    import okhttp3.AsyncDns.Companion.TYPE_AAAA
    import okhttp3.dnsoverhttps.DnsRecordCodec.decodeAnswers
    import okio.ByteString.Companion.decodeHex
    import org.junit.jupiter.api.Test
    
    class DnsRecordCodecTest {
      @Test
      fun testGoogleDotComEncoding() {
        val encoded = encodeQuery("google.com", TYPE_A)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
Back to top