- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 63 for assertFailsWith (0.13 sec)
-
okhttp/src/test/java/okhttp3/InsecureForHostTest.kt
import assertk.assertThat import assertk.assertions.isEmpty import assertk.assertions.isEqualTo import assertk.assertions.isNotNull import assertk.assertions.isNull import javax.net.ssl.SSLException import kotlin.test.assertFailsWith import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import okhttp3.testing.PlatformRule import okhttp3.tls.HandshakeCertificates import okhttp3.tls.HeldCertificate
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K 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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 75.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MediaTypeGetTest.kt
package okhttp3 import kotlin.test.assertEquals import kotlin.test.assertFailsWith import okhttp3.MediaType.Companion.toMediaType open class MediaTypeGetTest : MediaTypeTest() { override fun parse(string: String): MediaType = string.toMediaType() override fun assertInvalid( string: String, exceptionMessage: String?, ) { val e = assertFailsWith<IllegalArgumentException> { parse(string) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HandshakeTest.kt
import assertk.assertions.hasMessage import assertk.assertions.isEmpty import assertk.assertions.isEqualTo import assertk.assertions.isNull import java.io.IOException import java.security.cert.Certificate import kotlin.test.assertFailsWith import okhttp3.Handshake.Companion.handshake import okhttp3.tls.HeldCertificate import org.junit.jupiter.api.Test class HandshakeTest { val serverRoot = HeldCertificate.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt
) val buffer = Buffer() assertFailsWith<IndexOutOfBoundsException> { operator.read(0, buffer, -1L) } } @Test fun writeBounds() { val operator = FileOperator( randomAccessFile!!.getChannel(), ) val buffer = Buffer().writeUtf8("abc") assertFailsWith<IndexOutOfBoundsException> { operator.write(0, buffer, -1L) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestCommonTest.kt
val builder = Request.Builder() assertFailsWith<IllegalArgumentException> { builder.header(s, "Value") } assertFailsWith<IllegalArgumentException> { builder.addHeader(s, "Value") } assertFailsWith<IllegalArgumentException> { builder.header("Name", s) } assertFailsWith<IllegalArgumentException> { builder.addHeader("Name", s) } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt
} @Test fun closeCodeOutOfRangeThrows() { assertFailsWith<IllegalArgumentException> { clientWriter.writeClose(98724976, "Hello".encodeUtf8()) }.also { expected -> assertThat(expected.message).isEqualTo("Code must be in range [1000,5000): 98724976") } } @Test fun closeReservedThrows() { assertFailsWith<IllegalArgumentException> {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
import java.util.concurrent.BlockingQueue import java.util.concurrent.CountDownLatch import java.util.concurrent.Executors import java.util.concurrent.LinkedBlockingQueue import java.util.concurrent.TimeUnit import kotlin.test.assertFailsWith import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import mockwebserver3.internal.duplex.MockStreamHandler import okhttp3.Credentials.basic import okhttp3.Headers.Companion.headersOf
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
import java.net.HttpURLConnection import java.time.Duration import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicReference import kotlin.test.assertFailsWith import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.TestUtil.repeat import okhttp3.testing.Flaky import okio.BufferedSink
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartBodyTest.kt
val multipart = MultipartBody.Builder() assertFailsWith<IllegalArgumentException> { multipart.addPart( headersOf("Content-Type", "text/plain"), "Hello, World!".toRequestBody(null), ) } } @Test fun contentLengthHeaderIsForbidden() { val multipart = MultipartBody.Builder() assertFailsWith<IllegalArgumentException> { multipart.addPart(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.4K bytes - Viewed (0)