Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for MockWebServerInstance (0.12 sec)

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

     * limitations under the License.
     */
    package mockwebserver3.junit5.internal
    
    import okhttp3.ExperimentalOkHttpApi
    
    @ExperimentalOkHttpApi
    annotation class MockWebServerInstance(
      val name: String,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 764 bytes
    - Viewed (0)
  2. mockwebserver-junit5/src/test/java/mockwebserver3/junit5/internal/ExtensionMultipleInstancesTest.kt

      var defaultInstancePort: Int = -1
      var instanceAPort: Int = -1
      var instanceBPort: Int = -1
    
      @BeforeEach
      fun setup(
        defaultInstance: MockWebServer,
        @MockWebServerInstance("A") instanceA: MockWebServer,
        @MockWebServerInstance("B") instanceB: MockWebServer,
      ) {
        defaultInstancePort = defaultInstance.port
        instanceAPort = instanceA.port
        instanceBPort = instanceB.port
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. mockwebserver-junit5/README.md

      fun test() {
        ...
      }
    }
    ```
    
    Multiple instances can be obtained by naming additional ones:
    
    ```
    class MyTest(
      private val server: MockWebServer,
      @MockWebServerInstance("server2") private val server2: MockWebServer,
      @MockWebServerInstance("server3") private val server3: MockWebServer
    ) {
      @Test
      fun test() {
        ...
      }
    }
    ```
    
    Requirements
    ------------
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  4. mockwebserver-junit5/src/main/kotlin/mockwebserver3/junit5/internal/MockWebServerExtension.kt

     *
     * There are 3 ids for instances
     * - The test instance default (passed into constructor)
     * - The test lifecycle default (passed into test method, plus @BeforeEach, @AfterEach)
     * - named instances with @MockWebServerInstance.
     */
    @ExperimentalOkHttpApi
    class MockWebServerExtension :
      BeforeEachCallback, AfterEachCallback, ParameterResolver, BeforeAllCallback, AfterAllCallback {
      private val ExtensionContext.resource: ServersForTest
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 11 12:12:36 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

    import java.net.Proxy
    import java.net.SocketTimeoutException
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.ResetStreamAtStart
    import mockwebserver3.junit5.internal.MockWebServerInstance
    import okhttp3.internal.http.RecordingProxySelector
    import okhttp3.internal.http2.ErrorCode
    import okhttp3.testing.PlatformRule
    import org.junit.jupiter.api.BeforeEach
    import org.junit.jupiter.api.Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue May 14 17:48:07 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CacheTest.kt

      private lateinit var client: OkHttpClient
      private lateinit var cache: Cache
      private val cookieManager = CookieManager()
    
      @BeforeEach
      fun setUp(
        @MockWebServerInstance(name = "1") server: MockWebServer,
        @MockWebServerInstance(name = "2") server2: MockWebServer,
      ) {
        this.server = server
        this.server2 = server2
        platform.assumeNotOpenJSSE()
        server.protocolNegotiationEnabled = false
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

    import mockwebserver3.SocketPolicy.FailHandshake
    import mockwebserver3.SocketPolicy.ShutdownInputAtEnd
    import mockwebserver3.SocketPolicy.ShutdownOutputAtEnd
    import mockwebserver3.junit5.internal.MockWebServerInstance
    import okhttp3.Credentials.basic
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
    import okhttp3.MediaType.Companion.toMediaType
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CallTest.kt

    import mockwebserver3.SocketPolicy.HalfCloseAfterRequest
    import mockwebserver3.SocketPolicy.NoResponse
    import mockwebserver3.SocketPolicy.StallSocketAtStart
    import mockwebserver3.junit5.internal.MockWebServerInstance
    import okhttp3.CallEvent.CallEnd
    import okhttp3.CallEvent.ConnectStart
    import okhttp3.CallEvent.ConnectionAcquired
    import okhttp3.CallEvent.ConnectionReleased
    import okhttp3.CallEvent.ResponseFailed
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
Back to top