- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 108 for MockWebServer (0.19 sec)
-
native-image-tests/src/main/kotlin/okhttp3/SampleTest.kt
* limitations under the License. */ package okhttp3 import assertk.assertThat import assertk.assertions.isEqualTo import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import okhttp3.HttpUrl.Companion.toHttpUrl import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.RegisterExtension import org.junit.jupiter.params.ParameterizedTest
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
import okhttp3.DelegatingSocketFactory import okhttp3.OkHttpClient import okhttp3.OkHttpClientTestRule import okhttp3.Request import okhttp3.RequestBody import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import okhttp3.testing.PlatformRule import okio.Buffer import okio.BufferedSink import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java
import java.util.Collections; import okhttp3.OkHttpClient; import okhttp3.Protocol; import okhttp3.Request; import okhttp3.Response; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; /** * Create UNIX domain sockets for MockWebServer and OkHttp and connect 'em together. Note that we * cannot do TLS over domain sockets. */ public class ClientAndServer { public void run() throws Exception {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Dec 24 03:46:30 UTC 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt
} @Test @Disabled fun mockWebServer() { val mockWebServer = MockWebServer() var port: Int = mockWebServer.getPort() mockWebServer.setServerSocketFactory(ServerSocketFactory.getDefault()) mockWebServer.setBodyLimit(0L) mockWebServer.setProtocolNegotiationEnabled(false) mockWebServer.setProtocols(listOf(Protocol.HTTP_1_1))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocksProxyTest.kt
@RegisterExtension val platform = PlatformRule() @RegisterExtension val clientTestRule = OkHttpClientTestRule() private lateinit var server: MockWebServer private val socksProxy = SocksProxy() @BeforeEach fun setUp(server: MockWebServer) { this.server = server socksProxy.play() } @AfterEach fun tearDown() { socksProxy.shutdown() } @Test fun proxy() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/OpenJSSETest.kt
var platform = PlatformRule() @JvmField @RegisterExtension val clientTestRule = OkHttpClientTestRule() var client = clientTestRule.newClient() private lateinit var server: MockWebServer @BeforeEach fun setUp(server: MockWebServer) { this.server = server platform.assumeOpenJSSE() } @Test fun testTlsv13Works() { enableTls() server.enqueue(MockResponse(body = "abc"))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 3.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/BouncyCastleTest.kt
var platform = PlatformRule() @JvmField @RegisterExtension val clientTestRule = OkHttpClientTestRule() var client = clientTestRule.newClient() private lateinit var server: MockWebServer @BeforeEach fun setUp(server: MockWebServer) { this.server = server OkHttpDebugLogging.enable("org.bouncycastle.jsse") platform.assumeBouncyCastle() } @Test fun testMozilla() { assumeNetwork()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (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 public void test() throws Exception { // Create a MockWebServer. These are lean enough that you can create a new
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidLog.kt
this[OkHttpClient::class.java.name] = "okhttp.OkHttpClient" this[Http2::class.java.name] = "okhttp.Http2" this[TaskRunner::class.java.name] = "okhttp.TaskRunner" this["okhttp3.mockwebserver.MockWebServer"] = "okhttp.MockWebServer" }.toMap() internal fun androidLog( loggerName: String, logLevel: Int, message: String, t: Throwable? = null, ) { val tag = loggerTag(loggerName)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.9K bytes - Viewed (0) -
okhttp/src/test/java/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 listener = RecordingEventListener() private lateinit var client: OkHttpClient private lateinit var url: HttpUrl /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.3K bytes - Viewed (0)