- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 64 for mockWebServer (0.17 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) -
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) -
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/README.md
### Example Use MockWebServer the same way that you use mocking frameworks like [Mockito](https://github.com/mockito/mockito): 1. Script the mocks. 2. Run application code. 3. Verify that the expected requests were made. Here's a complete example: ### Java ```java public void test() throws Exception { // Create a MockWebServer. These are lean enough that you can create a new
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Oct 30 21:39:59 GMT 2025 - 8.1K bytes - Click Count (0) -
mockwebserver-junit5/src/main/kotlin/mockwebserver3/junit5/internal/StartStopExtension.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package mockwebserver3.junit5.internal import java.lang.reflect.Modifier import mockwebserver3.MockWebServer import mockwebserver3.junit5.StartStop import okhttp3.internal.SuppressSignatureCheck import org.junit.jupiter.api.extension.BeforeAllCallback import org.junit.jupiter.api.extension.BeforeEachCallback
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 2.4K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/FastFallbackTest.kt
private lateinit var localhostIpv4: InetAddress private lateinit var localhostIpv6: InetAddress private lateinit var serverIpv4: MockWebServer private lateinit var serverIpv6: MockWebServer private val eventRecorder = EventRecorder() private lateinit var client: OkHttpClient private lateinit var url: HttpUrl /**
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 10.6K bytes - Click Count (0) -
CHANGELOG.md
Put this annotation on a `MockWebServer` property and the extension will start it before your test executes and stop it after it completes. No further configuration is required. ```kotlin @StartStop val server = MockWebServer() ``` * Breaking: Don't automatically start `MockWebServer` after calls to accessors like `port`. NowCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Feb 15 11:57:47 GMT 2026 - 36.2K bytes - Click Count (2) -
samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt
import assertk.assertThat import assertk.assertions.containsExactlyInAnyOrder import assertk.assertions.isEqualTo import assertk.assertions.startsWith import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import mockwebserver3.junit5.StartStop import org.apache.hc.client5.http.classic.methods.HttpGet import org.apache.hc.client5.http.impl.classic.HttpClients import org.apache.hc.core5.http.io.entity.EntityUtils
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Feb 04 20:23:14 GMT 2026 - 2.3K bytes - Click Count (0)