- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for assertRequests (0.09 sec)
-
okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt
dns.assertRequests(uriHost) proxySelector.assertRequests(address.url.toUri()) } @Test fun proxySelectorReturnsMultipleProxies() { val address = factory.newAddress() proxySelector.proxies.add(proxyA) proxySelector.proxies.add(proxyB) val routeSelector = newRouteSelector(address) proxySelector.assertRequests(address.url.toUri())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Mar 06 17:33:38 UTC 2024 - 20.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/http/RecordingProxySelector.kt
private val requestedUris = mutableListOf<URI>() private val failures = mutableListOf<String>() override fun select(uri: URI): List<Proxy> { requestedUris.add(uri) return proxies } fun assertRequests(vararg expectedUris: URI?) { assertThat(requestedUris).containsExactly(*expectedUris) requestedUris.clear() } override fun connectFailed( uri: URI, sa: SocketAddress, ioe: IOException,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt
@Throws(UnknownHostException::class) override fun lookup(hostname: String): List<InetAddress> { requestedHosts.add(hostname) return hostAddresses[hostname] ?: throw UnknownHostException() } fun assertRequests(vararg expectedHosts: String?) { assertThat(requestedHosts).containsExactly(*expectedHosts) requestedHosts.clear() } /** Allocates and returns `count` fake IPv4 addresses like [255.0.0.100, 255.0.0.101]. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
.dns(dns) .build() server.enqueue(MockResponse()) val request = Request(server.url("/").newBuilder().host("android.com").build()) executeSynchronously(request).assertCode(200) dns.assertRequests("android.com") } @Test fun dnsReturnsZeroIpAddresses() { // Configure a DNS that returns our local MockWebServer for android.com. val dns = FakeDns()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0)