- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for IllegalStateException (0.25 sec)
-
okhttp/src/test/java/okhttp3/internal/UtilTest.kt
assertThat(checkDuration("timeout", 0, TimeUnit.MILLISECONDS)).isEqualTo(0) assertThat(checkDuration("timeout", 1, TimeUnit.MILLISECONDS)).isEqualTo(1) assertThat( assertThrows<IllegalStateException> { checkDuration("timeout", -1, TimeUnit.MILLISECONDS) }, ).hasMessage("timeout < 0") assertThat( assertThrows<IllegalArgumentException> {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartReaderTest.kt
boundary = "simple boundary", source = Buffer().writeUtf8(multipart), ) val partAbc = parts.nextPart()!! val partMno = parts.nextPart()!! assertFailsWith<IllegalStateException> { partAbc.body.request(20) }.also { expected -> assertThat(expected).hasMessage("closed") } assertThat(partMno.body.readUtf8()).isEqualTo("mnop")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Call.kt
* problem or timeout. Because networks can fail during an exchange, it is possible that the * remote server accepted the request before the failure. * @throws IllegalStateException when the call has already been executed. */ @Throws(IOException::class) fun execute(): Response /** * Schedules the request to be executed at some point in the future. *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 3.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
client.newBuilder() .addNetworkInterceptor(interceptor) .build() val request = Request.Builder() .url(server.url("/")) .build() assertFailsWith<IllegalStateException> { client.newCall(request).execute() }.also { expected -> assertThat(expected.message).isEqualTo( "network interceptor $interceptor must call proceed() exactly once", ) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 27.8K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java
public void start() throws Exception { if (mockWebServer != null) throw new IllegalStateException(); mockWebServer = new MockWebServer(); mockWebServer.setDispatcher(this); mockWebServer.start(slackApi.port); } public HttpUrl newAuthorizeUrl(String scopes, String team, Listener listener) { if (mockWebServer == null) throw new IllegalStateException(); ByteString state = randomToken(); synchronized (this) {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 3.8K bytes - Viewed (0) -
native-image-tests/src/main/kotlin/okhttp3/TestRegistration.kt
* limitations under the License. */ package okhttp3 import com.oracle.svm.core.annotate.AutomaticFeature import java.io.File import java.lang.IllegalStateException import org.graalvm.nativeimage.hosted.Feature import org.graalvm.nativeimage.hosted.RuntimeClassInitialization import org.graalvm.nativeimage.hosted.RuntimeReflection @AutomaticFeature
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseJvmTest.kt
val response = newResponse("".toResponseBody()) { // All live paths (Http1, Http2) in OkHttp do this trailers { error("trailers not available") } } assertFailsWith<IllegalStateException>(message = "trailers not available") { response.trailers() } } @Test fun worksIfTrailersSet() { val response = newResponse("".toResponseBody()) { trailers {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
contentLength != -1L -> newKnownLengthSink() // Stream a request body of a known length. else -> // Stream a request body of a known length. throw IllegalStateException( "Cannot stream a request body without chunked encoding or a known content length!", ) } } override fun cancel() { carrier.cancel() } /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 16.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HttpUrlTest.kt
} @Test fun incompleteUrlComposition() { val noHost = assertFailsWith<IllegalStateException> { HttpUrl.Builder().scheme("http").build() } assertThat(noHost.message).isEqualTo("host == null") val noScheme = assertFailsWith<IllegalStateException> { HttpUrl.Builder().host("host").build() }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 67.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
}, ), ) assertThat(readAscii(response.body.byteStream(), Int.MAX_VALUE)) .isEqualTo("abc") assertFailsWith<IllegalStateException> { sinkReference.get().flush() } assertFailsWith<IllegalStateException> { sinkReference.get().write("ghi".toByteArray()) sinkReference.get().emit() } } @Test fun getHeadersThrows() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 131.7K bytes - Viewed (0)