Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for mock (0.15 sec)

  1. okhttp/src/test/resources/web-platform-test-urltestdata.txt

    ///test  s:file p:/test
    file://test  s:file h:test p:/
    file://localhost  s:file h:localhost p:/
    file://localhost/  s:file h:localhost p:/
    file://localhost/test  s:file h:localhost p:/test
    test  s:file p:/tmp/mock/test
    file:test  s:file p:/tmp/mock/test
    
    # Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js
    http://example.com/././foo about:blank s:http h:example.com p:/foo
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      }
    
      @Test
      fun setResponseMockReason() {
        val reasons =
          arrayOf(
            "Mock Response",
            "Informational",
            "OK",
            "Redirection",
            "Client Error",
            "Server Error",
            "Mock Response",
          )
        for (i in 0..599) {
          val response = MockResponse().setResponseCode(i)
          val expectedReason = reasons[i / 100]
    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)
  3. LICENSES/vendor/github.com/golang/mock/LICENSE

    = vendor/github.com/golang/mock licensed under: =
    
    
                                     Apache License
                               Version 2.0, January 2004
                            http://www.apache.org/licenses/
    
       TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    
       1. Definitions.
    
          "License" shall mean the terms and conditions for use, reproduction,
          and distribution as defined by Sections 1 through 9 of this document.
    
    Plain Text
    - Registered: Fri Apr 12 09:05:11 GMT 2024
    - Last Modified: Fri May 08 04:49:00 GMT 2020
    - 11.2K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

    import okhttp3.Headers.Companion.headersOf
    import okhttp3.WebSocketListener
    import okhttp3.internal.addHeaderLenient
    import okhttp3.internal.http2.Settings
    import okio.Buffer
    
    /** A scripted response to be replayed by the mock web server. */
    @ExperimentalOkHttpApi
    class MockResponse {
      /** Returns the HTTP response line, such as "HTTP/1.1 200 OK". */
      val status: String
    
      val code: Int
        get() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  5. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

      }
    
      @Test
      fun setResponseMockReason() {
        val reasons =
          arrayOf<String?>(
            "Mock Response",
            "Informational",
            "OK",
            "Redirection",
            "Client Error",
            "Server Error",
            "Mock Response",
          )
        for (i in 0..599) {
          val builder = MockResponse.Builder().code(i)
          val expectedReason = reasons[i / 100]
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  6. docs/changelogs/upgrading_to_okhttp_4.md

    in OkHttp 3.x and are final in 4.x. These were made non-final for use with mocking frameworks like
    [Mockito][mockito]. We believe subtyping `OkHttpClient` is the wrong way to test with OkHttp. If
    you must, mock `Call.Factory` which is the interface that `OkHttpClient` implements.
    
    #### Internal API changes
    
    The `okhttp3.internal` package is not a published API and we change it frequently without warning.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:58:16 GMT 2022
    - 10.9K bytes
    - Viewed (0)
  7. docs/changelogs/changelog_2x.md

        new API, `Call.isCanceled()` to check if a call has been canceled.
    
     *  New: Update `MultipartBuilder` to support content length.
     *  New: Make it possible to mock `OkHttpClient` and `Call`.
     *  New: Update to h2-14 and hpack-9.
     *  New: OkHttp includes a user-agent by default, like `okhttp/2.1.0-RC1`.
     *  Fix: Handle response code `308 Permanent Redirect`.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      internal inline fun Any.assertThreadHoldsLock() {
        if (assertionsEnabled && !taskRunner.lock.isHeldByCurrentThread) {
          throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this")
        }
      }
    
      @Suppress("NOTHING_TO_INLINE")
      internal inline fun Any.assertThreadDoesntHoldLock() {
        if (assertionsEnabled && taskRunner.lock.isHeldByCurrentThread) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

     */
    class TaskRunner(
      val backend: Backend,
      internal val logger: Logger = TaskRunner.logger,
    ) {
      val lock: ReentrantLock = ReentrantLock()
      val condition: Condition = lock.newCondition()
    
      private var nextQueueName = 10000
      private var coordinatorWaiting = false
      private var coordinatorWakeUpAt = 0L
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

        throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this")
      }
    }
    
    @Suppress("NOTHING_TO_INLINE")
    internal inline fun Any.assertThreadHoldsLock() {
      if (assertionsEnabled && !Thread.holdsLock(this)) {
        throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this")
      }
    }
    
    @Suppress("NOTHING_TO_INLINE")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top