- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for assertFailsWith (0.2 sec)
-
okhttp/src/test/java/okhttp3/HeadersTest.kt
} @Test fun ofRejectsNullChar() { assertFailsWith<IllegalArgumentException> { headersOf("User-Agent", "Square\u0000OkHttp") } } @Test fun ofMapThrowsOnEmptyName() { assertFailsWith<IllegalArgumentException> { mapOf("" to "OkHttp").toHeaders() } } @Test fun ofMapThrowsOnBlankName() { assertFailsWith<IllegalArgumentException> { mapOf(" " to "OkHttp").toHeaders()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HeadersJvmTest.kt
} @Test fun addThrowsOnEmptyName() { assertFailsWith<IllegalArgumentException> { Headers.Builder().add(": bar") } assertFailsWith<IllegalArgumentException> { Headers.Builder().add(" : bar") } } @Test fun addThrowsOnNoColon() { assertFailsWith<IllegalArgumentException> { Headers.Builder().add("foo bar") } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
) call.execute().use { response -> assertThat(response.body.string()).isEqualTo("abc") val requestBodyOut = requestBody.takeSink() assertFailsWith<IOException> { SlowRequestBody.writeTo(requestBodyOut) } assertFailsWith<IOException> { requestBodyOut.close() } } // Confirm that the connection pool was not corrupted by making another call.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.5K bytes - Viewed (0) -
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/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/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-brotli/src/test/java/okhttp3/brotli/BrotliInterceptorTest.kt
import assertk.assertThat import assertk.assertions.contains import assertk.assertions.hasMessage import assertk.assertions.isEmpty import assertk.assertions.isEqualTo import java.io.IOException import kotlin.test.assertFailsWith import okhttp3.MediaType.Companion.toMediaType import okhttp3.Protocol import okhttp3.Request import okhttp3.Response import okhttp3.ResponseBody.Companion.toResponseBody import okhttp3.brotli.internal.uncompress
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/http/ThreadInterruptTest.kt
import assertk.fail import java.io.IOException import java.net.ServerSocket import java.net.Socket import java.net.SocketException import java.util.concurrent.TimeUnit import kotlin.test.assertFailsWith import okhttp3.DelegatingServerSocketFactory import okhttp3.DelegatingSocketFactory import okhttp3.OkHttpClient import okhttp3.OkHttpClientTestRule import okhttp3.Request import okhttp3.RequestBody
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0)