- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for assertInvalid (0.05 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/StatusLineTest.kt
@Test fun missingProtocol() { assertInvalid("") assertInvalid(" ") assertInvalid("200 OK") assertInvalid(" 200 OK") } @Test fun protocolVersions() { assertInvalid("HTTP/2.0 200 OK") assertInvalid("HTTP/2.1 200 OK") assertInvalid("HTTP/-.1 200 OK") assertInvalid("HTTP/1.- 200 OK") assertInvalid("HTTP/0.1 200 OK") assertInvalid("HTTP/101 200 OK")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MediaTypeTest.kt
} @Test fun testInvalidParse() { assertInvalid("", "No subtype found for: \"\"") assertInvalid("/", "No subtype found for: \"/\"") assertInvalid("text", "No subtype found for: \"text\"") assertInvalid("text/", "No subtype found for: \"text/\"") assertInvalid("te<t/plain", "No subtype found for: \"te<t/plain\"") assertInvalid(" text/plain", "No subtype found for: \" text/plain\"")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 7.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MediaTypeGetTest.kt
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) } assertEquals(exceptionMessage, e.message) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.1K bytes - Viewed (0)