- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 105 for mockWebServer (0.08 seconds)
-
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
} public override fun toString(): String { val socketAddress = socketAddress_ return when { closed -> "MockWebServer{closed}" socketAddress != null -> "MockWebServer{port=${socketAddress.port}}" else -> "MockWebServer{new}" } } /** A buffer wrapper that drops data after [bodyLimit] bytes. */ private class TruncatingBuffer(
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 40.3K bytes - Click Count (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockWebServer.kt
import javax.net.ServerSocketFactory import javax.net.ssl.SSLSocketFactory import okhttp3.HttpUrl import okhttp3.Protocol import org.junit.rules.ExternalResource class MockWebServer : ExternalResource(), Closeable { val delegate = mockwebserver3.MockWebServer() val requestCount: Int by delegate::requestCount var bodyLimit: Long by delegate::bodyLimit
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 18 00:19:42 GMT 2025 - 4.6K bytes - Click Count (0) -
mockwebserver-junit5/src/test/java/mockwebserver3/junit5/StartStopTest.kt
val serverD = MockWebServer().apply { dispatcher = dispatcherD } private val dispatcherE = ClosableDispatcher() @StartStop @JvmStatic val serverE = MockWebServer().apply { dispatcher = dispatcherE } private val dispatcherF = ClosableDispatcher() @JvmStatic val serverF = MockWebServer().apply { dispatcher = dispatcherFCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 18 11:13:17 GMT 2025 - 3.3K bytes - Click Count (1) -
okhttp/src/jvmMain/java9/module-info.java
exports okhttp3.internal.concurrent to mockwebserver3, okhttp3.mockwebserver; exports okhttp3.internal.connection to mockwebserver3, okhttp3.mockwebserver, okhttp3.logging; exports okhttp3.internal.http to okhttp3.logging, okhttp3.brotli, mockwebserver3;
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 992 bytes - Click Count (0) -
settings.gradle.kts
} include(":mockwebserver") project(":mockwebserver").name = "mockwebserver3" include(":mockwebserver-deprecated") project(":mockwebserver-deprecated").name = "mockwebserver" include(":mockwebserver-junit4") project(":mockwebserver-junit4").name = "mockwebserver3-junit4" include(":mockwebserver-junit5") project(":mockwebserver-junit5").name = "mockwebserver3-junit5"Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Feb 05 09:17:33 GMT 2026 - 2.3K bytes - Click Count (0) -
maven-tests/src/test/java/com/squareup/okhttp3/maventest/AppTest.java
import mockwebserver3.MockResponse; import mockwebserver3.MockWebServer; import okhttp3.Headers; import org.junit.Test; import java.io.IOException; /** * Unit test for simple App. */ public class AppTest { private final MockWebServer mockWebServer = new MockWebServer(); @Test public void testApp() throws IOException { mockWebServer.enqueue(new MockResponse(200, Headers.of(), "Hello, Maven!"));Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jul 12 12:05:57 GMT 2025 - 1.1K bytes - Click Count (0) -
mockwebserver-junit5/src/main/kotlin/mockwebserver3/junit5/StartStop.kt
import org.junit.jupiter.api.extension.ExtendWith /** * Runs MockWebServer for the duration of a test method or test class. * * In Java JUnit 5 tests (ie. tests annotated `@org.junit.jupiter.api.Test`), use this by defining a * field with the `@StartStop` annotation: * * ```java * @StartStop public final MockWebServer server = new MockWebServer(); * ``` * * Or for Kotlin: * * ```kotlin
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Jun 19 11:44:16 GMT 2025 - 1.3K bytes - Click Count (0) -
mockwebserver-junit5/README.md
MockWebServer for JUnit 5 ========================= This module integrates mockwebserver3.MockWebServer with JUnit 5. To use, first add this library as a test dependency: ``` testImplementation("com.squareup.okhttp3:mockwebserver3-junit5:5.3.0") ``` Annotate fields in test classes with `@StartStop`. The server will be started and shut down automatically. ``` class MyTest { @StartStopCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Oct 30 21:39:59 GMT 2025 - 665 bytes - Click Count (0) -
mockwebserver-junit4/README.md
MockWebServer for JUnit 4 ========================= This module integrates mockwebserver3.MockWebServer with JUnit 4. To use, first add this library as a test dependency: ``` testImplementation("com.squareup.okhttp3:mockwebserver3-junit4:5.3.0") ``` Then in tests annotated `@org.junit.Test`, you may declare a field with the `@Rule` annotation: ``` @Rule public final MockWebServerRule serverRule = new MockWebServerRule(); ```Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Oct 30 21:39:59 GMT 2025 - 706 bytes - Click Count (0) -
mockwebserver-junit4/src/main/kotlin/mockwebserver3/junit4/MockWebServerRule.kt
* limitations under the License. */ package mockwebserver3.junit4 import java.io.IOException import mockwebserver3.MockWebServer import org.junit.rules.ExternalResource /** * Runs MockWebServer for the duration of a single test method. * * In Java JUnit 4 tests (ie. tests annotated `@org.junit.Test`), use this by defining a field with * the `@Rule` annotation: *
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Mon Jun 16 22:36:18 GMT 2025 - 1.4K bytes - Click Count (0)