Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for testcase (0.25 sec)

  1. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackDecodeTestBase.kt

      private val hpackReader = Hpack.Reader(bytesIn, 4096)
    
      protected fun testDecoder(story: Story) {
        for (testCase in story.cases) {
          val encoded = testCase.wire ?: continue
          bytesIn.write(encoded)
          hpackReader.readHeaders()
          assertSetEquals(
            "seqno=$testCase.seqno",
            testCase.headersList,
            hpackReader.getAndResetHeaderList(),
          )
        }
      }
    
      companion object {
        /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/SocksProxyTest.kt

        assertThat(response.body.string()).isEqualTo("abc")
        assertThat(socksProxy.connectionCount()).isEqualTo(1)
      }
    
      @Test
      fun checkRemoteDNSResolve() {
        // This testcase will fail if the target is resolved locally instead of through the proxy.
        server.enqueue(MockResponse.Builder().body("abc").build())
        val client =
          clientTestRule.newClientBuilder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/authenticator/JavaNetAuthenticatorTest.kt

     * limitations under the License.
     */
    package okhttp3.internal.authenticator
    
    import java.net.Authenticator
    import java.net.InetAddress
    import junit.framework.TestCase.assertNull
    import okhttp3.FakeDns
    import okhttp3.Protocol.HTTP_2
    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.TestValueFactory
    import okhttp3.internal.RecordingAuthenticator
    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)
  4. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        val ctxt = InstrumentationRegistry.getInstrumentation().targetContext.applicationContext
    
        val cacheSize = 1L * 1024 * 1024 // 1MB
        val cache = Cache(ctxt.cacheDir.resolve("testCache"), cacheSize)
    
        try {
          client =
            client.newBuilder()
              .cache(cache)
              .build()
    
          val request =
            Request.Builder()
              .url(server.url("/"))
    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)
  5. okhttp/src/test/java/okhttp3/HeadersJvmTest.kt

      }
    
      @Test fun setDate() {
        val expected = Date(1000)
        val headers =
          Headers.Builder()
            .add("testDate", Date(0L))
            .set("testDate", expected)
            .build()
        assertThat(headers["testDate"]).isEqualTo("Thu, 01 Jan 1970 00:00:01 GMT")
        assertThat(headers.getDate("testDate")).isEqualTo(expected)
      }
    
      @Test fun setInstant() {
        val expected = Instant.ofEpochMilli(1000L)
        val headers =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  6. native-image-tests/src/main/kotlin/okhttp3/TestRegistration.kt

        val knownTestFile = File("src/main/resources/testlist.txt").absoluteFile
        knownTestFile.readLines().forEach {
          try {
            val testClass = access.findClassByName(it)
    
            if (testClass != null) {
              access.registerAsUsed(testClass)
              registerTest(access, testClass)
            }
          } catch (e: Exception) {
            // If you throw an exception here then native image building fails half way through
    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)
  7. native-image-tests/src/main/kotlin/okhttp3/GenerateClassList.kt

      val testSelector = DiscoverySelectors.selectPackage("okhttp3")
      val testClasses =
        findTests(listOf(testSelector))
          .filter { it.isContainer }
          .mapNotNull { (it as? ClassBasedTestDescriptor)?.testClass?.name }
          .filterNot { it in avoidedTests }
          .sorted()
          .distinct()
      knownTestFile.writeText(testClasses.joinToString("\n"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        return (testMethod.orElseGet { null }?.isAnnotationPresent(Flaky::class.java) == true) ||
          (testClass.orElseGet { null }?.isAnnotationPresent(Flaky::class.java) == true)
      }
    
      @Synchronized private fun logEvents() {
        // Will be ineffective if test overrides the listener
        synchronized(clientEventsList) {
          println("$testName Events (${clientEventsList.size})")
    
          for (e in clientEventsList) {
            println(e)
    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)
  9. native-image-tests/src/test/kotlin/okhttp3/nativeImage/NativeImageTestsTest.kt

        val x = findTests(testSelector)
    
        x.find { it is ClassBasedTestDescriptor && it.testClass == SampleTest::class.java }
      }
    
      @Test
      fun testFindsModuleTests() {
        val testSelector = DiscoverySelectors.selectPackage("okhttp3")
        val x = findTests(listOf(testSelector))
    
        x.find { it is ClassBasedTestDescriptor && it.testClass == SampleTest::class.java }
      }
    
      @Test
      fun testFindsProjectTests() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
Back to top