- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for assertFailsWith (0.21 sec)
-
okhttp/src/test/java/okhttp3/OkHttpClientTest.kt
builder.networkInterceptors().addAll(listOf(null) as List<Interceptor>) assertFailsWith<IllegalStateException> { builder.build() }.also { expected -> assertThat(expected.message).isEqualTo("Null network interceptor: [null]") } } @Test fun testH2PriorKnowledgeOkHttpClientConstructionFallback() { assertFailsWith<IllegalArgumentException> { OkHttpClient.Builder()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 13.2K bytes - Viewed (0) -
okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt
*/ package okhttp3.coroutines import assertk.assertThat import assertk.assertions.isEqualTo import assertk.assertions.isTrue import java.io.IOException import java.util.concurrent.TimeUnit import kotlin.test.assertFailsWith import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.CancellationException import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.TimeoutCancellationException
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 18 01:24:38 GMT 2024 - 5.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
val requestBuilder = Request.Builder() assertFailsWith<IllegalArgumentException> { requestBuilder.url("ftp://hostname/path") }.also { expected -> assertThat(expected.message).isEqualTo("Expected URL scheme 'http' or 'https' but was 'ftp'") } } @Test fun invalidPort() { val requestBuilder = Request.Builder() assertFailsWith<IllegalArgumentException> {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 142.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt
dns.assertRequests(uriHost) assertThat(selection.hasNext()).isFalse() assertFailsWith<NoSuchElementException> { selection.next() } assertThat(routeSelector.hasNext()).isFalse() assertFailsWith<NoSuchElementException> { routeSelector.next() } } @Test fun singleRouteReturnsFailedRoute() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Mar 06 17:33:38 GMT 2024 - 20.8K bytes - Viewed (0) -
okhttp-coroutines/src/test/kotlin/okhttp3/SuspendCallTest.kt
package okhttp3 import assertk.assertThat import assertk.assertions.isEqualTo import assertk.assertions.isTrue import java.io.IOException import java.util.concurrent.TimeUnit import kotlin.test.assertFailsWith import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.CancellationException import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi
Plain Text - Registered: Fri Apr 12 11:42:09 GMT 2024 - Last Modified: Fri Apr 05 11:25:23 GMT 2024 - 5.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt
val sink2 = stream2.getSink().buffer() sink1.writeUtf8("abc") assertFailsWith<IOException> { sink2.writeUtf8("abc") sink2.flush() }.also { expected -> assertThat(expected.message).isEqualTo("stream was reset: REFUSED_STREAM") } sink1.writeUtf8("def") sink1.close() assertFailsWith<ConnectionShutdownException> { connection.newStream(headerEntries("c", "cola"), true)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 75.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt
private fun Editor.assertInoperable() { assertFailsWith<IllegalStateException> { setString(0, "A") } assertFailsWith<IllegalStateException> { newSource(0) } assertFailsWith<IllegalStateException> { newSink(0) } assertFailsWith<IllegalStateException> { commit() } assertFailsWith<IllegalStateException> { abort() }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 14:55:09 GMT 2024 - 75.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt
import assertk.assertions.isNull import assertk.assertions.isTrue import java.io.File import java.io.IOException import java.util.concurrent.Callable import java.util.concurrent.Executors import kotlin.test.assertFailsWith import okhttp3.TestUtil.threadFactory import okhttp3.internal.cache2.Relay.Companion.edit import okhttp3.internal.cache2.Relay.Companion.read import okio.Buffer import okio.ByteString
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt
import assertk.assertions.containsExactly import assertk.assertions.hasMessage import assertk.assertions.isEqualTo import java.io.IOException import java.net.UnknownServiceException import kotlin.test.assertFailsWith import okhttp3.FakeRoutePlanner import okhttp3.FakeRoutePlanner.ConnectState.TLS_CONNECTED import okhttp3.internal.concurrent.TaskFaker import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Test /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 24 04:40:49 GMT 2024 - 20.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeoutException import java.util.concurrent.atomic.AtomicReference import javax.net.ssl.SSLException import kotlin.test.assertFailsWith import mockwebserver3.Dispatcher import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import mockwebserver3.PushPromise import mockwebserver3.QueueDispatcher import mockwebserver3.RecordedRequest
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 75.3K bytes - Viewed (0)