diff --git a/benchmark/microbenchmark/src/androidTestIncubating/kotlin/com/apollographql/apollo3/benchmark/CacheIncubatingIntegrationTests.kt b/benchmark/microbenchmark/src/androidTestIncubating/kotlin/com/apollographql/apollo3/benchmark/CacheIncubatingIntegrationTests.kt index f3f5bb40391..3d30e6b33c1 100644 --- a/benchmark/microbenchmark/src/androidTestIncubating/kotlin/com/apollographql/apollo3/benchmark/CacheIncubatingIntegrationTests.kt +++ b/benchmark/microbenchmark/src/androidTestIncubating/kotlin/com/apollographql/apollo3/benchmark/CacheIncubatingIntegrationTests.kt @@ -16,10 +16,10 @@ import com.apollographql.apollo3.cache.normalized.api.NormalizedCacheFactory import com.apollographql.apollo3.cache.normalized.fetchPolicy import com.apollographql.apollo3.cache.normalized.sql.SqlNormalizedCacheFactory import com.apollographql.apollo3.cache.normalized.store -import com.apollographql.apollo3.mockserver.MockRequestBase -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.MockServerHandler +import com.apollographql.mockserver.MockRequestBase +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.MockServerHandler import com.apollographql.apollo3.testing.MapTestNetworkTransport import com.apollographql.apollo3.testing.registerTestResponse import kotlinx.coroutines.joinAll diff --git a/benchmark/microbenchmark/src/androidTestStable/kotlin/com/apollographql/apollo3/benchmark/CacheIntegrationTests.kt b/benchmark/microbenchmark/src/androidTestStable/kotlin/com/apollographql/apollo3/benchmark/CacheIntegrationTests.kt index a088efaed44..4a14ae376fd 100644 --- a/benchmark/microbenchmark/src/androidTestStable/kotlin/com/apollographql/apollo3/benchmark/CacheIntegrationTests.kt +++ b/benchmark/microbenchmark/src/androidTestStable/kotlin/com/apollographql/apollo3/benchmark/CacheIntegrationTests.kt @@ -16,10 +16,10 @@ import com.apollographql.apollo3.cache.normalized.api.NormalizedCacheFactory import com.apollographql.apollo3.cache.normalized.fetchPolicy import com.apollographql.apollo3.cache.normalized.sql.SqlNormalizedCacheFactory import com.apollographql.apollo3.cache.normalized.store -import com.apollographql.apollo3.mockserver.MockRequestBase -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.MockServerHandler +import com.apollographql.mockserver.MockRequestBase +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.MockServerHandler import com.apollographql.apollo3.testing.MapTestNetworkTransport import com.apollographql.apollo3.testing.registerTestResponse import kotlinx.coroutines.joinAll diff --git a/gradle/libraries.toml b/gradle/libraries.toml index 2fc68f3f696..860dd21907f 100644 --- a/gradle/libraries.toml +++ b/gradle/libraries.toml @@ -66,9 +66,7 @@ apollo-api = { group = "com.apollographql.apollo3", name = "apollo-api", version apollo-api-java = { group = "com.apollographql.apollo3", name = "apollo-api-java", version.ref = "apollo" } apollo-httpCache = { group = "com.apollographql.apollo3", name = "apollo-http-cache", version.ref = "apollo" } apollo-idlingresource = { group = "com.apollographql.apollo3", name = "apollo-idling-resource", version.ref = "apollo" } -apollo-mockserver = { group = "com.apollographql.apollo3", name = "apollo-mockserver", version.ref = "apollo" } -# Used by the apollo-tooling project which uses a published version of Apollo -apollo-mockserver-published = { group = "com.apollographql.apollo3", name = "apollo-mockserver", version.ref = "apollo-published" } +apollo-mockserver = { group = "com.apollographql.mockserver", name = "apollo-mockserver", version = "0.0.1" } apollo-mpputils = { group = "com.apollographql.apollo3", name = "apollo-mpp-utils", version.ref = "apollo" } apollo-normalizedcache = { group = "com.apollographql.apollo3", name = "apollo-normalized-cache", version.ref = "apollo" } apollo-normalizedcache-incubating = { group = "com.apollographql.apollo3", name = "apollo-normalized-cache-incubating", version.ref = "apollo" } diff --git a/libraries/apollo-http-cache/build.gradle.kts b/libraries/apollo-http-cache/build.gradle.kts index 546771c9b82..3ff9d348f6d 100644 --- a/libraries/apollo-http-cache/build.gradle.kts +++ b/libraries/apollo-http-cache/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { implementation(libs.moshi) implementation(libs.kotlinx.datetime) - testImplementation(project(":apollo-mockserver")) + testImplementation(libs.apollo.mockserver) testImplementation(libs.kotlin.test.junit) testImplementation(libs.truth) } diff --git a/libraries/apollo-http-cache/src/test/kotlin/com/apollographql/apollo3/cache/http/internal/CachingHttpInterceptorTest.kt b/libraries/apollo-http-cache/src/test/kotlin/com/apollographql/apollo3/cache/http/internal/CachingHttpInterceptorTest.kt index 91e9b65e180..b83a2f72afb 100644 --- a/libraries/apollo-http-cache/src/test/kotlin/com/apollographql/apollo3/cache/http/internal/CachingHttpInterceptorTest.kt +++ b/libraries/apollo-http-cache/src/test/kotlin/com/apollographql/apollo3/cache/http/internal/CachingHttpInterceptorTest.kt @@ -6,9 +6,9 @@ import com.apollographql.apollo3.api.http.HttpResponse import com.apollographql.apollo3.api.http.valueOf import com.apollographql.apollo3.cache.http.CachingHttpInterceptor import com.apollographql.apollo3.exception.HttpCacheMissException -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.http.DefaultHttpEngine import com.apollographql.apollo3.network.http.HttpInterceptorChain import kotlinx.coroutines.Dispatchers diff --git a/libraries/apollo-runtime/build.gradle.kts b/libraries/apollo-runtime/build.gradle.kts index 5096bf6c130..f284c866d69 100644 --- a/libraries/apollo-runtime/build.gradle.kts +++ b/libraries/apollo-runtime/build.gradle.kts @@ -24,7 +24,7 @@ kotlin { } fun KotlinDependencyHandler.commonTestDependencies() { - implementation(project(":apollo-mockserver")) + implementation(libs.apollo.mockserver) implementation(libs.turbine) implementation(project(":apollo-testing-support")) { because("runTest") diff --git a/libraries/apollo-runtime/src/androidInstrumentedTest/kotlin/instrumented/NetworkMonitorTest.kt b/libraries/apollo-runtime/src/androidInstrumentedTest/kotlin/instrumented/NetworkMonitorTest.kt index ab15d53eab8..d978205fdac 100644 --- a/libraries/apollo-runtime/src/androidInstrumentedTest/kotlin/instrumented/NetworkMonitorTest.kt +++ b/libraries/apollo-runtime/src/androidInstrumentedTest/kotlin/instrumented/NetworkMonitorTest.kt @@ -4,8 +4,8 @@ import androidx.test.platform.app.InstrumentationRegistry import com.apollographql.apollo3.api.http.HttpRequest import com.apollographql.apollo3.api.http.HttpResponse import com.apollographql.apollo3.exception.ApolloNetworkException -import com.apollographql.apollo3.mockserver.assertNoRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.assertNoRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.NetworkMonitor import com.apollographql.apollo3.network.http.DefaultHttpEngine import com.apollographql.apollo3.network.http.HttpEngine diff --git a/libraries/apollo-runtime/src/appleTest/kotlin/com/apollographql/apollo3/network/http/DefaultHttpEngineTest.kt b/libraries/apollo-runtime/src/appleTest/kotlin/com/apollographql/apollo3/network/http/DefaultHttpEngineTest.kt index 62b3a6a45b7..582c7e1bc47 100644 --- a/libraries/apollo-runtime/src/appleTest/kotlin/com/apollographql/apollo3/network/http/DefaultHttpEngineTest.kt +++ b/libraries/apollo-runtime/src/appleTest/kotlin/com/apollographql/apollo3/network/http/DefaultHttpEngineTest.kt @@ -2,8 +2,8 @@ package com.apollographql.apollo3.network.http import com.apollographql.apollo3.api.http.HttpMethod import com.apollographql.apollo3.api.http.HttpRequest -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import platform.Foundation.NSURLSessionConfiguration import kotlin.test.Test diff --git a/libraries/apollo-runtime/src/commonTest/kotlin/test/network/NetworkMonitorTest.kt b/libraries/apollo-runtime/src/commonTest/kotlin/test/network/NetworkMonitorTest.kt index 2fe039056c4..9fb41e53428 100644 --- a/libraries/apollo-runtime/src/commonTest/kotlin/test/network/NetworkMonitorTest.kt +++ b/libraries/apollo-runtime/src/commonTest/kotlin/test/network/NetworkMonitorTest.kt @@ -8,9 +8,9 @@ import com.apollographql.apollo3.api.Operation import com.apollographql.apollo3.exception.ApolloNetworkException import com.apollographql.apollo3.interceptor.ApolloInterceptor import com.apollographql.apollo3.interceptor.ApolloInterceptorChain -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.assertNoRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.assertNoRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.NetworkMonitor import com.apollographql.apollo3.testing.FooQuery import com.apollographql.apollo3.testing.internal.runTest diff --git a/libraries/apollo-runtime/src/commonTest/kotlin/test/network/WebSocketEngineTest.kt b/libraries/apollo-runtime/src/commonTest/kotlin/test/network/WebSocketEngineTest.kt index 9b1f47b403b..b915683a1c1 100644 --- a/libraries/apollo-runtime/src/commonTest/kotlin/test/network/WebSocketEngineTest.kt +++ b/libraries/apollo-runtime/src/commonTest/kotlin/test/network/WebSocketEngineTest.kt @@ -1,18 +1,18 @@ package test.network import com.apollographql.apollo3.exception.ApolloException -import com.apollographql.apollo3.mockserver.CloseFrame -import com.apollographql.apollo3.mockserver.DataMessage -import com.apollographql.apollo3.mockserver.MockRequestBase -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.PingFrame -import com.apollographql.apollo3.mockserver.PongFrame -import com.apollographql.apollo3.mockserver.TextMessage -import com.apollographql.apollo3.mockserver.WebSocketBody -import com.apollographql.apollo3.mockserver.WebSocketMessage -import com.apollographql.apollo3.mockserver.WebsocketMockRequest -import com.apollographql.apollo3.mockserver.awaitWebSocketRequest -import com.apollographql.apollo3.mockserver.enqueueWebSocket +import com.apollographql.mockserver.CloseFrame +import com.apollographql.mockserver.DataMessage +import com.apollographql.mockserver.MockRequestBase +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.PingFrame +import com.apollographql.mockserver.PongFrame +import com.apollographql.mockserver.TextMessage +import com.apollographql.mockserver.WebSocketBody +import com.apollographql.mockserver.WebSocketMessage +import com.apollographql.mockserver.WebsocketMockRequest +import com.apollographql.mockserver.awaitWebSocketRequest +import com.apollographql.mockserver.enqueueWebSocket import com.apollographql.apollo3.mpp.Platform import com.apollographql.apollo3.mpp.platform import com.apollographql.apollo3.network.websocket.WebSocket diff --git a/libraries/apollo-runtime/src/commonTest/kotlin/test/network/WebSocketNetworkTransportTest.kt b/libraries/apollo-runtime/src/commonTest/kotlin/test/network/WebSocketNetworkTransportTest.kt index 6f66c739610..d7314fe3d69 100644 --- a/libraries/apollo-runtime/src/commonTest/kotlin/test/network/WebSocketNetworkTransportTest.kt +++ b/libraries/apollo-runtime/src/commonTest/kotlin/test/network/WebSocketNetworkTransportTest.kt @@ -8,13 +8,13 @@ import com.apollographql.apollo3.exception.ApolloWebSocketClosedException import com.apollographql.apollo3.exception.DefaultApolloException import com.apollographql.apollo3.exception.SubscriptionOperationException import com.apollographql.apollo3.interceptor.addRetryOnErrorInterceptor -import com.apollographql.apollo3.mockserver.CloseFrame -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.TextMessage -import com.apollographql.apollo3.mockserver.WebSocketBody -import com.apollographql.apollo3.mockserver.WebsocketMockRequest -import com.apollographql.apollo3.mockserver.awaitWebSocketRequest -import com.apollographql.apollo3.mockserver.enqueueWebSocket +import com.apollographql.mockserver.CloseFrame +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.TextMessage +import com.apollographql.mockserver.WebSocketBody +import com.apollographql.mockserver.WebsocketMockRequest +import com.apollographql.mockserver.awaitWebSocketRequest +import com.apollographql.mockserver.enqueueWebSocket import com.apollographql.apollo3.mpp.Platform import com.apollographql.apollo3.mpp.platform import com.apollographql.apollo3.network.websocket.WebSocketNetworkTransport @@ -23,7 +23,6 @@ import com.apollographql.apollo3.testing.FooSubscription import com.apollographql.apollo3.testing.FooSubscription.Companion.completeMessage import com.apollographql.apollo3.testing.FooSubscription.Companion.errorMessage import com.apollographql.apollo3.testing.FooSubscription.Companion.nextMessage -import com.apollographql.apollo3.testing.awaitSubscribe import com.apollographql.apollo3.testing.connectionAckMessage import com.apollographql.apollo3.testing.internal.runTest import kotlinx.coroutines.CoroutineScope diff --git a/libraries/apollo-runtime/src/commonTest/kotlin/test/network/utils.kt b/libraries/apollo-runtime/src/commonTest/kotlin/test/network/utils.kt new file mode 100644 index 00000000000..6b8b579f531 --- /dev/null +++ b/libraries/apollo-runtime/src/commonTest/kotlin/test/network/utils.kt @@ -0,0 +1,44 @@ +package test.network + +import com.apollographql.apollo3.annotations.ApolloExperimental +import com.apollographql.apollo3.api.json.jsonReader +import com.apollographql.apollo3.api.json.readAny +import com.apollographql.mockserver.TextMessage +import com.apollographql.mockserver.WebsocketMockRequest +import okio.Buffer +import kotlin.time.Duration +import kotlin.time.Duration.Companion.seconds + +suspend fun WebsocketMockRequest.awaitSubscribe(timeout: Duration = 1.seconds, messagesToIgnore: Set = emptySet()): String { + while(true) { + val message = awaitMessage(timeout) + if (message !is TextMessage) { + TODO() + } + val map = (Buffer().writeUtf8(message.text).jsonReader().readAny() as Map<*, *>) + + if (messagesToIgnore.contains(map["type"])) { + continue + } + check(map["type"] == "subscribe") { + "Expected subscribe, got '${map.get("type")}'" + } + return map.get("id") as String + } +} + +/** + * Extracts the operationId from a graphql-ws message, ignores "complete messages" + */ +@ApolloExperimental +suspend fun WebsocketMockRequest.awaitComplete(timeout: Duration = 1.seconds) { + val message = awaitMessage(timeout) + if (message !is TextMessage) { + TODO() + } + val map = (Buffer().writeUtf8(message.text).jsonReader().readAny() as Map<*, *>) + + check(map["type"] == "complete") { + "Expected complete, got '${map.get("type")}" + } +} diff --git a/libraries/apollo-runtime/src/jvmTest/kotlin/RetryWebSocketsTest.kt b/libraries/apollo-runtime/src/jvmTest/kotlin/RetryWebSocketsTest.kt index 0dbef176468..94b342bf3ca 100644 --- a/libraries/apollo-runtime/src/jvmTest/kotlin/RetryWebSocketsTest.kt +++ b/libraries/apollo-runtime/src/jvmTest/kotlin/RetryWebSocketsTest.kt @@ -5,16 +5,15 @@ import com.apollographql.apollo3.api.Subscription import com.apollographql.apollo3.exception.ApolloHttpException import com.apollographql.apollo3.exception.ApolloNetworkException import com.apollographql.apollo3.interceptor.addRetryOnErrorInterceptor -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitWebSocketRequest -import com.apollographql.apollo3.mockserver.enqueueWebSocket +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitWebSocketRequest +import com.apollographql.mockserver.enqueueWebSocket import com.apollographql.apollo3.network.websocket.WebSocketNetworkTransport import com.apollographql.apollo3.testing.FooQuery import com.apollographql.apollo3.testing.FooSubscription import com.apollographql.apollo3.testing.FooSubscription.Companion.completeMessage import com.apollographql.apollo3.testing.FooSubscription.Companion.nextMessage -import com.apollographql.apollo3.testing.awaitSubscribe import com.apollographql.apollo3.testing.connectionAckMessage import com.apollographql.apollo3.testing.internal.runTest import kotlinx.coroutines.CoroutineScope @@ -31,6 +30,7 @@ import kotlin.test.assertEquals import kotlin.test.assertIs import kotlin.test.assertNotEquals import kotlin.time.Duration.Companion.seconds +import test.network.awaitSubscribe class RetryWebSocketsTest { @Test diff --git a/libraries/apollo-tooling/build.gradle.kts b/libraries/apollo-tooling/build.gradle.kts index 48e531650ad..b683588faa3 100644 --- a/libraries/apollo-tooling/build.gradle.kts +++ b/libraries/apollo-tooling/build.gradle.kts @@ -22,7 +22,7 @@ dependencies { testImplementation(libs.junit) testImplementation(libs.truth) - testImplementation(libs.apollo.mockserver.published) + testImplementation(libs.apollo.mockserver) testImplementation(libs.apollo.testingsupport.published) } diff --git a/libraries/apollo-tooling/src/test/kotlin/com/apollographql/apollo3/tooling/FieldInsightsTests.kt b/libraries/apollo-tooling/src/test/kotlin/com/apollographql/apollo3/tooling/FieldInsightsTests.kt index c5523e4aa50..b53cf46a044 100644 --- a/libraries/apollo-tooling/src/test/kotlin/com/apollographql/apollo3/tooling/FieldInsightsTests.kt +++ b/libraries/apollo-tooling/src/test/kotlin/com/apollographql/apollo3/tooling/FieldInsightsTests.kt @@ -1,7 +1,7 @@ package com.apollographql.apollo3.tooling -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import com.google.common.truth.Truth import org.junit.Test diff --git a/libraries/apollo-tooling/src/test/kotlin/com/apollographql/apollo3/tooling/SchemaDownloaderTests.kt b/libraries/apollo-tooling/src/test/kotlin/com/apollographql/apollo3/tooling/SchemaDownloaderTests.kt index f90c5da5c0a..10c1c9c640e 100644 --- a/libraries/apollo-tooling/src/test/kotlin/com/apollographql/apollo3/tooling/SchemaDownloaderTests.kt +++ b/libraries/apollo-tooling/src/test/kotlin/com/apollographql/apollo3/tooling/SchemaDownloaderTests.kt @@ -1,7 +1,7 @@ package com.apollographql.apollo3.tooling -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import com.apollographql.apollo3.testing.pathToUtf8 import org.junit.Assert.assertEquals diff --git a/tests/defer/build.gradle.kts b/tests/defer/build.gradle.kts index 548aaccc7fb..700eaf469be 100644 --- a/tests/defer/build.gradle.kts +++ b/tests/defer/build.gradle.kts @@ -17,8 +17,8 @@ kotlin { findByName("commonTest")?.apply { dependencies { implementation(libs.apollo.normalizedcache) - implementation(libs.apollo.mockserver) implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) } } diff --git a/tests/defer/src/commonTest/kotlin/test/DeferNormalizedCacheTest.kt b/tests/defer/src/commonTest/kotlin/test/DeferNormalizedCacheTest.kt index bc0969fb2ff..1b01f4d5741 100644 --- a/tests/defer/src/commonTest/kotlin/test/DeferNormalizedCacheTest.kt +++ b/tests/defer/src/commonTest/kotlin/test/DeferNormalizedCacheTest.kt @@ -17,12 +17,12 @@ import com.apollographql.apollo3.exception.ApolloException import com.apollographql.apollo3.exception.ApolloHttpException import com.apollographql.apollo3.exception.ApolloNetworkException import com.apollographql.apollo3.exception.CacheMissException -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.assertNoRequest -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueError -import com.apollographql.apollo3.mockserver.enqueueMultipart -import com.apollographql.apollo3.mockserver.enqueueStrings +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.assertNoRequest +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueError +import com.apollographql.mockserver.enqueueMultipart +import com.apollographql.mockserver.enqueueStrings import com.apollographql.apollo3.mpp.Platform import com.apollographql.apollo3.mpp.platform import com.apollographql.apollo3.network.NetworkTransport diff --git a/tests/defer/src/commonTest/kotlin/test/DeferTest.kt b/tests/defer/src/commonTest/kotlin/test/DeferTest.kt index ec134160edd..5114b2b1868 100644 --- a/tests/defer/src/commonTest/kotlin/test/DeferTest.kt +++ b/tests/defer/src/commonTest/kotlin/test/DeferTest.kt @@ -4,10 +4,10 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.ApolloResponse import com.apollographql.apollo3.api.Error import com.apollographql.apollo3.autoPersistedQueryInfo -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueMultipart -import com.apollographql.apollo3.mockserver.enqueueString -import com.apollographql.apollo3.mockserver.enqueueStrings +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueMultipart +import com.apollographql.mockserver.enqueueString +import com.apollographql.mockserver.enqueueStrings import com.apollographql.apollo3.mpp.Platform import com.apollographql.apollo3.mpp.currentTimeMillis import com.apollographql.apollo3.mpp.platform diff --git a/tests/defer/src/jvmTest/kotlin/test/DeferJvmTest.kt b/tests/defer/src/jvmTest/kotlin/test/DeferJvmTest.kt index f852d5b17f3..a4c33c07ecc 100644 --- a/tests/defer/src/jvmTest/kotlin/test/DeferJvmTest.kt +++ b/tests/defer/src/jvmTest/kotlin/test/DeferJvmTest.kt @@ -4,8 +4,8 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.cache.http.HttpFetchPolicy import com.apollographql.apollo3.cache.http.httpCache import com.apollographql.apollo3.cache.http.httpFetchPolicy -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueMultipart +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueMultipart import com.apollographql.apollo3.mpp.currentTimeMillis import com.apollographql.apollo3.testing.awaitElement import com.apollographql.apollo3.testing.internal.runTest diff --git a/tests/engine/build.gradle.kts b/tests/engine/build.gradle.kts index 36b4e210877..5b26f0849b2 100644 --- a/tests/engine/build.gradle.kts +++ b/tests/engine/build.gradle.kts @@ -19,8 +19,8 @@ kotlin { val commonTest = getByName("commonTest").apply { dependencies { - implementation(libs.apollo.mockserver) implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) implementation(libs.turbine) } } diff --git a/tests/engine/src/commonTest/kotlin/GzipTest.kt b/tests/engine/src/commonTest/kotlin/GzipTest.kt index 541fb3b965e..35bda45579a 100644 --- a/tests/engine/src/commonTest/kotlin/GzipTest.kt +++ b/tests/engine/src/commonTest/kotlin/GzipTest.kt @@ -1,6 +1,6 @@ -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer import com.apollographql.apollo3.network.http.DefaultHttpEngine import com.apollographql.apollo3.network.http.HttpEngine import com.apollographql.apollo3.network.http.get diff --git a/tests/engine/src/commonTest/kotlin/HttpEngineTest.kt b/tests/engine/src/commonTest/kotlin/HttpEngineTest.kt index 0a45312c847..f1bb039779b 100644 --- a/tests/engine/src/commonTest/kotlin/HttpEngineTest.kt +++ b/tests/engine/src/commonTest/kotlin/HttpEngineTest.kt @@ -3,10 +3,10 @@ import com.apollographql.apollo3.api.http.HttpMethod import com.apollographql.apollo3.api.http.HttpRequest import com.apollographql.apollo3.api.http.valueOf import com.apollographql.apollo3.exception.ApolloException -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import kotlin.test.Test import kotlin.test.assertEquals diff --git a/tests/engine/src/commonTest/kotlin/WebSocketEngineTest.kt b/tests/engine/src/commonTest/kotlin/WebSocketEngineTest.kt index 634e2ca63ff..f91795cec08 100644 --- a/tests/engine/src/commonTest/kotlin/WebSocketEngineTest.kt +++ b/tests/engine/src/commonTest/kotlin/WebSocketEngineTest.kt @@ -3,12 +3,12 @@ import com.apollographql.apollo3.api.http.HttpHeader import com.apollographql.apollo3.exception.ApolloException import com.apollographql.apollo3.exception.ApolloNetworkException import com.apollographql.apollo3.exception.ApolloWebSocketClosedException -import com.apollographql.apollo3.mockserver.CloseFrame -import com.apollographql.apollo3.mockserver.DataMessage -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.TextMessage -import com.apollographql.apollo3.mockserver.awaitWebSocketRequest -import com.apollographql.apollo3.mockserver.enqueueWebSocket +import com.apollographql.mockserver.CloseFrame +import com.apollographql.mockserver.DataMessage +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.TextMessage +import com.apollographql.mockserver.awaitWebSocketRequest +import com.apollographql.mockserver.enqueueWebSocket import com.apollographql.apollo3.mpp.Platform import com.apollographql.apollo3.mpp.platform import com.apollographql.apollo3.testing.internal.runTest diff --git a/tests/gzip/build.gradle.kts b/tests/gzip/build.gradle.kts index fd47314a5e1..9378d54626e 100644 --- a/tests/gzip/build.gradle.kts +++ b/tests/gzip/build.gradle.kts @@ -16,6 +16,7 @@ kotlin { findByName("commonTest")?.apply { dependencies { implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) } } } diff --git a/tests/gzip/src/commonTest/kotlin/test/GzipTest.kt b/tests/gzip/src/commonTest/kotlin/test/GzipTest.kt index 42570b70f63..8173924b3d0 100644 --- a/tests/gzip/src/commonTest/kotlin/test/GzipTest.kt +++ b/tests/gzip/src/commonTest/kotlin/test/GzipTest.kt @@ -1,8 +1,8 @@ package test import com.apollographql.apollo3.ApolloClient -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer import com.apollographql.apollo3.testing.HostFileSystem import com.apollographql.apollo3.testing.internal.runTest import com.apollographql.apollo3.testing.testsPath diff --git a/tests/http-cache/build.gradle.kts b/tests/http-cache/build.gradle.kts index f5d125becd3..46b7b031d99 100644 --- a/tests/http-cache/build.gradle.kts +++ b/tests/http-cache/build.gradle.kts @@ -10,9 +10,9 @@ apolloTest() dependencies { implementation(libs.apollo.runtime) implementation(libs.apollo.httpCache) - implementation(libs.apollo.mockserver) - testImplementation(libs.kotlin.test.junit) testImplementation(libs.apollo.testingsupport) + testImplementation(libs.kotlin.test.junit) + testImplementation(libs.apollo.mockserver) } apollo { diff --git a/tests/http-cache/src/test/kotlin/HttpCacheTest.kt b/tests/http-cache/src/test/kotlin/HttpCacheTest.kt index b30d7196e53..7a8b3edcb4a 100644 --- a/tests/http-cache/src/test/kotlin/HttpCacheTest.kt +++ b/tests/http-cache/src/test/kotlin/HttpCacheTest.kt @@ -11,10 +11,10 @@ import com.apollographql.apollo3.cache.http.httpFetchPolicy import com.apollographql.apollo3.cache.http.isFromHttpCache import com.apollographql.apollo3.exception.ApolloNetworkException import com.apollographql.apollo3.exception.HttpCacheMissException -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueError -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueError +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.okHttpClient import com.apollographql.apollo3.testing.internal.runTest import httpcache.GetRandom2Query diff --git a/tests/http-cache/src/test/kotlin/WithHttpCacheTest.kt b/tests/http-cache/src/test/kotlin/WithHttpCacheTest.kt index 41d5c4d33c3..38c823023f4 100644 --- a/tests/http-cache/src/test/kotlin/WithHttpCacheTest.kt +++ b/tests/http-cache/src/test/kotlin/WithHttpCacheTest.kt @@ -2,8 +2,8 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.cache.http.httpCache import com.apollographql.apollo3.cache.http.isFromHttpCache -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import httpcache.GetRandomQuery import kotlinx.coroutines.runBlocking diff --git a/tests/http-headers/build.gradle.kts b/tests/http-headers/build.gradle.kts index d4ea1abb07f..20e098c8b6f 100644 --- a/tests/http-headers/build.gradle.kts +++ b/tests/http-headers/build.gradle.kts @@ -7,9 +7,9 @@ apolloTest() dependencies { implementation(libs.apollo.runtime) - implementation(libs.apollo.mockserver) - testImplementation(libs.kotlin.test.junit) testImplementation(libs.apollo.testingsupport) + testImplementation(libs.kotlin.test.junit) + testImplementation(libs.apollo.mockserver) } apollo { diff --git a/tests/http-headers/src/test/kotlin/HttpHeaderTest.kt b/tests/http-headers/src/test/kotlin/HttpHeaderTest.kt index 6ad448d0d74..ac4cf9b39e5 100644 --- a/tests/http-headers/src/test/kotlin/HttpHeaderTest.kt +++ b/tests/http-headers/src/test/kotlin/HttpHeaderTest.kt @@ -2,9 +2,9 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.DefaultUpload import com.apollographql.apollo3.api.Optional -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString -import com.apollographql.apollo3.mockserver.headerValueOf +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString +import com.apollographql.mockserver.headerValueOf import com.apollographql.apollo3.testing.internal.runTest import httpheaders.GetRandomQuery import httpheaders.UploadMutation diff --git a/tests/idling-resource/src/test/java/IdlingResourceTest.kt b/tests/idling-resource/src/test/java/IdlingResourceTest.kt index f58581e515a..09415f13c09 100644 --- a/tests/idling-resource/src/test/java/IdlingResourceTest.kt +++ b/tests/idling-resource/src/test/java/IdlingResourceTest.kt @@ -2,8 +2,8 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.android.ApolloIdlingResource import com.apollographql.apollo3.android.idlingResource -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer import idling.resource.IdlingResourceQuery import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.delay diff --git a/tests/include-skip-operation-based/build.gradle.kts b/tests/include-skip-operation-based/build.gradle.kts index a0185ff624b..9fce09e6dfb 100644 --- a/tests/include-skip-operation-based/build.gradle.kts +++ b/tests/include-skip-operation-based/build.gradle.kts @@ -11,9 +11,9 @@ dependencies { implementation(libs.apollo.runtime) implementation(libs.apollo.httpCache) implementation(libs.apollo.normalizedcache) - implementation(libs.apollo.mockserver) - testImplementation(libs.kotlin.test.junit) testImplementation(libs.apollo.testingsupport) + testImplementation(libs.kotlin.test.junit) + testImplementation(libs.apollo.mockserver) } apollo { diff --git a/tests/integration-tests/build.gradle.kts b/tests/integration-tests/build.gradle.kts index 4e647888da8..058095fe90d 100644 --- a/tests/integration-tests/build.gradle.kts +++ b/tests/integration-tests/build.gradle.kts @@ -21,8 +21,8 @@ kotlin { findByName("commonTest")?.apply { dependencies { implementation(libs.apollo.adapters) - implementation(libs.apollo.mockserver) implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) implementation(libs.kotlinx.coroutines) implementation(libs.kotlinx.serialization.json) implementation(libs.kotlinx.coroutines.test) diff --git a/tests/integration-tests/src/appleTest/kotlin/test/HttpEngineTest.kt b/tests/integration-tests/src/appleTest/kotlin/test/HttpEngineTest.kt index ec64da0f93e..85da42459c4 100644 --- a/tests/integration-tests/src/appleTest/kotlin/test/HttpEngineTest.kt +++ b/tests/integration-tests/src/appleTest/kotlin/test/HttpEngineTest.kt @@ -4,9 +4,9 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.annotations.ApolloInternal import com.apollographql.apollo3.exception.ApolloNetworkException import com.apollographql.apollo3.integration.normalizer.HeroNameQuery -import com.apollographql.apollo3.mockserver.KtorTcpServer -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.KtorTcpServer +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.mpp.currentTimeMillis import com.apollographql.apollo3.network.http.DefaultHttpEngine import com.apollographql.apollo3.network.http.get diff --git a/tests/integration-tests/src/appleTest/kotlin/test/NativeThreadTest.kt b/tests/integration-tests/src/appleTest/kotlin/test/NativeThreadTest.kt index d7706a85dec..53533573ec3 100644 --- a/tests/integration-tests/src/appleTest/kotlin/test/NativeThreadTest.kt +++ b/tests/integration-tests/src/appleTest/kotlin/test/NativeThreadTest.kt @@ -3,8 +3,8 @@ package test import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.integration.normalizer.EpisodeHeroNameQuery import com.apollographql.apollo3.integration.normalizer.type.Episode -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.newSingleThreadContext diff --git a/tests/integration-tests/src/commonTest/kotlin/test/AutoPersistedQueriesTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/AutoPersistedQueriesTest.kt index 7b21eceb796..58a18bdb886 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/AutoPersistedQueriesTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/AutoPersistedQueriesTest.kt @@ -7,9 +7,9 @@ import com.apollographql.apollo3.integration.normalizer.HeroNameQuery import com.apollographql.apollo3.integration.normalizer.UpdateReviewMutation import com.apollographql.apollo3.integration.normalizer.type.ColorInput import com.apollographql.apollo3.integration.normalizer.type.ReviewInput -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import testFixtureToUtf8 import kotlin.test.Test diff --git a/tests/integration-tests/src/commonTest/kotlin/test/BasicTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/BasicTest.kt index af35421f4d7..835914eb0c8 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/BasicTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/BasicTest.kt @@ -18,8 +18,8 @@ import com.apollographql.apollo3.integration.normalizer.HeroAppearsInQuery import com.apollographql.apollo3.integration.normalizer.SameHeroTwiceQuery import com.apollographql.apollo3.integration.normalizer.StarshipByIdQuery import com.apollographql.apollo3.integration.normalizer.type.Episode -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import testFixtureToUtf8 import kotlin.test.Test diff --git a/tests/integration-tests/src/commonTest/kotlin/test/BodyExtensionsTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/BodyExtensionsTest.kt index 28eea6789f8..ad9db4fc5d7 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/BodyExtensionsTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/BodyExtensionsTest.kt @@ -12,9 +12,9 @@ import com.apollographql.apollo3.api.json.jsonReader import com.apollographql.apollo3.api.json.readAny import com.apollographql.apollo3.api.json.writeObject import com.apollographql.apollo3.integration.fullstack.LaunchDetailsQuery -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueError +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueError import com.apollographql.apollo3.network.http.HttpNetworkTransport import com.apollographql.apollo3.testing.internal.runTest import okio.Buffer diff --git a/tests/integration-tests/src/commonTest/kotlin/test/CancelTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/CancelTest.kt index 33a7d73099b..f4ebb72a594 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/CancelTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/CancelTest.kt @@ -7,8 +7,8 @@ import com.apollographql.apollo3.cache.normalized.fetchPolicy import com.apollographql.apollo3.cache.normalized.normalizedCache import com.apollographql.apollo3.integration.normalizer.EpisodeHeroNameQuery import com.apollographql.apollo3.integration.normalizer.type.Episode -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import kotlinx.coroutines.delay import kotlinx.coroutines.flow.toList diff --git a/tests/integration-tests/src/commonTest/kotlin/test/ExceptionsTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/ExceptionsTest.kt index 62dbd3f8bed..34ee4bc57b7 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/ExceptionsTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/ExceptionsTest.kt @@ -8,9 +8,9 @@ import com.apollographql.apollo3.exception.ApolloNetworkException import com.apollographql.apollo3.integration.normalizer.HeroAndFriendsNamesQuery import com.apollographql.apollo3.integration.normalizer.HeroNameQuery import com.apollographql.apollo3.integration.normalizer.type.Episode -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueError -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueError +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import kotlinx.coroutines.flow.toList import kotlin.test.Test diff --git a/tests/integration-tests/src/commonTest/kotlin/test/FetchPolicyTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/FetchPolicyTest.kt index 2320ead7b86..0b730f76151 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/FetchPolicyTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/FetchPolicyTest.kt @@ -31,10 +31,10 @@ import com.apollographql.apollo3.integration.normalizer.CharacterNameByIdQuery import com.apollographql.apollo3.integration.normalizer.HeroNameQuery import com.apollographql.apollo3.interceptor.ApolloInterceptor import com.apollographql.apollo3.interceptor.ApolloInterceptorChain -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueError -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueError +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.assertNoElement import com.apollographql.apollo3.testing.awaitElement import com.apollographql.apollo3.testing.internal.runTest diff --git a/tests/integration-tests/src/commonTest/kotlin/test/FileUploadTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/FileUploadTest.kt index 30a8af79a2a..4f39b724286 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/FileUploadTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/FileUploadTest.kt @@ -12,10 +12,10 @@ import com.apollographql.apollo3.integration.upload.SingleUploadMutation import com.apollographql.apollo3.integration.upload.SingleUploadTwiceMutation import com.apollographql.apollo3.integration.upload.type.NestedObject import com.apollographql.apollo3.internal.MultipartReader -import com.apollographql.apollo3.mockserver.MockRequest -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockRequest +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import okio.Buffer import kotlin.test.Test diff --git a/tests/integration-tests/src/commonTest/kotlin/test/HTTPHeadersTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/HTTPHeadersTest.kt index be273ac38de..4823cb02355 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/HTTPHeadersTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/HTTPHeadersTest.kt @@ -5,10 +5,10 @@ import com.apollographql.apollo3.api.composeJsonResponse import com.apollographql.apollo3.api.http.valueOf import com.apollographql.apollo3.api.json.buildJsonString import com.apollographql.apollo3.integration.normalizer.HeroNameQuery -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.http.HttpInfo import com.apollographql.apollo3.testing.internal.runTest import kotlin.test.Test diff --git a/tests/integration-tests/src/commonTest/kotlin/test/HttpErrorBodyTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/HttpErrorBodyTest.kt index 4928b7d94f4..e01422491e1 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/HttpErrorBodyTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/HttpErrorBodyTest.kt @@ -4,8 +4,8 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.annotations.ApolloExperimental import com.apollographql.apollo3.exception.ApolloHttpException import com.apollographql.apollo3.integration.normalizer.HeroNameQuery -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import kotlin.test.Test import kotlin.test.assertEquals diff --git a/tests/integration-tests/src/commonTest/kotlin/test/HttpGetTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/HttpGetTest.kt index 498b911ab28..448b79b3c23 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/HttpGetTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/HttpGetTest.kt @@ -5,9 +5,9 @@ import com.apollographql.apollo3.api.http.HttpMethod import com.apollographql.apollo3.integration.normalizer.HeroAndFriendsNamesQuery import com.apollographql.apollo3.integration.normalizer.SearchHeroQuery import com.apollographql.apollo3.integration.normalizer.type.Episode -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import kotlinx.coroutines.CoroutineScope import okio.use diff --git a/tests/integration-tests/src/commonTest/kotlin/test/HttpRequestComposerTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/HttpRequestComposerTest.kt index 2e6a50664ed..7fef96cf537 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/HttpRequestComposerTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/HttpRequestComposerTest.kt @@ -5,9 +5,9 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.ApolloRequest import com.apollographql.apollo3.api.http.DefaultHttpRequestComposer import com.apollographql.apollo3.integration.httpcache.AllPlanetsQuery -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import okio.Buffer import kotlin.test.Test diff --git a/tests/integration-tests/src/commonTest/kotlin/test/JsonScalarTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/JsonScalarTest.kt index e5824694a00..35dd9f97cbd 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/JsonScalarTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/JsonScalarTest.kt @@ -9,8 +9,8 @@ import com.apollographql.apollo3.cache.normalized.fetchPolicy import com.apollographql.apollo3.cache.normalized.store import com.apollographql.apollo3.integration.normalizer.GetJsonScalarQuery import com.apollographql.apollo3.integration.normalizer.type.Json -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import testFixtureToUtf8 import kotlin.test.Test diff --git a/tests/integration-tests/src/commonTest/kotlin/test/LoggingInterceptorTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/LoggingInterceptorTest.kt index edd78b66374..16fa6e01f02 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/LoggingInterceptorTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/LoggingInterceptorTest.kt @@ -4,8 +4,8 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.Upload import com.apollographql.apollo3.integration.normalizer.HeroNameQuery import com.apollographql.apollo3.integration.upload.SingleUploadMutation -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.http.LoggingInterceptor import com.apollographql.apollo3.network.http.LoggingInterceptor.Level import com.apollographql.apollo3.testing.internal.runTest diff --git a/tests/integration-tests/src/commonTest/kotlin/test/OptimisticCacheTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/OptimisticCacheTest.kt index 4acf790bafb..31cd59a7868 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/OptimisticCacheTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/OptimisticCacheTest.kt @@ -19,8 +19,8 @@ import com.apollographql.apollo3.integration.normalizer.UpdateReviewMutation import com.apollographql.apollo3.integration.normalizer.type.ColorInput import com.apollographql.apollo3.integration.normalizer.type.Episode import com.apollographql.apollo3.integration.normalizer.type.ReviewInput -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.awaitElement import com.apollographql.apollo3.testing.internal.runTest import com.benasher44.uuid.uuid4 diff --git a/tests/integration-tests/src/commonTest/kotlin/test/OtherCacheTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/OtherCacheTest.kt index 5059ef52f7e..328eaf340e2 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/OtherCacheTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/OtherCacheTest.kt @@ -19,8 +19,8 @@ import com.apollographql.apollo3.integration.normalizer.HeroAndFriendsNamesWithI import com.apollographql.apollo3.integration.normalizer.InstantQuery import com.apollographql.apollo3.integration.normalizer.UpdateReviewWithoutVariableMutation import com.apollographql.apollo3.integration.normalizer.type.Episode -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import kotlinx.datetime.Instant import testFixtureToUtf8 diff --git a/tests/integration-tests/src/commonTest/kotlin/test/ScalarAdapterTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/ScalarAdapterTest.kt index c281757cbac..420232e1dc8 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/ScalarAdapterTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/ScalarAdapterTest.kt @@ -7,9 +7,9 @@ import com.apollographql.apollo3.api.json.JsonReader import com.apollographql.apollo3.api.json.JsonWriter import com.apollographql.apollo3.integration.fullstack.LaunchDetailsByDateQuery import com.apollographql.apollo3.integration.fullstack.type.Date -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import com.example.MyDate import testFixtureToUtf8 diff --git a/tests/integration-tests/src/commonTest/kotlin/test/WatcherErrorHandlingTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/WatcherErrorHandlingTest.kt index 4cce78b1fae..fd91e952b8d 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/WatcherErrorHandlingTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/WatcherErrorHandlingTest.kt @@ -14,9 +14,9 @@ import com.apollographql.apollo3.exception.ApolloHttpException import com.apollographql.apollo3.exception.CacheMissException import com.apollographql.apollo3.integration.normalizer.EpisodeHeroNameQuery import com.apollographql.apollo3.integration.normalizer.type.Episode -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueError -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueError +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.awaitElement import com.apollographql.apollo3.testing.internal.runTest import kotlinx.coroutines.Job diff --git a/tests/integration-tests/src/commonTest/kotlin/test/WatcherTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/WatcherTest.kt index 94faa869825..9cd6fa2af30 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/WatcherTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/WatcherTest.kt @@ -21,9 +21,9 @@ import com.apollographql.apollo3.integration.normalizer.EpisodeHeroNameWithIdQue import com.apollographql.apollo3.integration.normalizer.HeroAndFriendsNamesWithIDsQuery import com.apollographql.apollo3.integration.normalizer.StarshipByIdQuery import com.apollographql.apollo3.integration.normalizer.type.Episode -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.QueueTestNetworkTransport import com.apollographql.apollo3.testing.assertNoElement import com.apollographql.apollo3.testing.awaitElement diff --git a/tests/integration-tests/src/commonTest/kotlin/test/batching/QueryBatchingTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/batching/QueryBatchingTest.kt index 0e47c9e5fd7..00ce2182309 100644 --- a/tests/integration-tests/src/commonTest/kotlin/test/batching/QueryBatchingTest.kt +++ b/tests/integration-tests/src/commonTest/kotlin/test/batching/QueryBatchingTest.kt @@ -8,9 +8,9 @@ import com.apollographql.apollo3.api.CustomScalarAdapters import com.apollographql.apollo3.api.ExecutionOptions.Companion.CAN_BE_BATCHED import com.apollographql.apollo3.api.http.HttpHeader import com.apollographql.apollo3.api.json.jsonReader -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import kotlinx.coroutines.async import kotlinx.coroutines.delay diff --git a/tests/integration-tests/src/jvmTest/kotlin/test/ApqCacheTest.kt b/tests/integration-tests/src/jvmTest/kotlin/test/ApqCacheTest.kt index 4ba7e7baac3..2e15970184c 100644 --- a/tests/integration-tests/src/jvmTest/kotlin/test/ApqCacheTest.kt +++ b/tests/integration-tests/src/jvmTest/kotlin/test/ApqCacheTest.kt @@ -6,8 +6,8 @@ import com.apollographql.apollo3.api.http.HttpMethod import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.normalizedCache import com.apollographql.apollo3.integration.normalizer.HeroNameQuery -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import org.junit.Test import kotlin.test.fail diff --git a/tests/integration-tests/src/jvmTest/kotlin/test/CacheMissLoggingInterceptorTest.kt b/tests/integration-tests/src/jvmTest/kotlin/test/CacheMissLoggingInterceptorTest.kt index 944e7e4fe75..1ff6e72acbe 100644 --- a/tests/integration-tests/src/jvmTest/kotlin/test/CacheMissLoggingInterceptorTest.kt +++ b/tests/integration-tests/src/jvmTest/kotlin/test/CacheMissLoggingInterceptorTest.kt @@ -8,8 +8,8 @@ import com.apollographql.apollo3.cache.normalized.logCacheMisses import com.apollographql.apollo3.cache.normalized.normalizedCache import com.apollographql.apollo3.integration.normalizer.HeroAppearsInQuery import com.apollographql.apollo3.integration.normalizer.HeroNameQuery -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import kotlin.test.Test import kotlin.test.assertEquals diff --git a/tests/integration-tests/src/jvmTest/kotlin/test/CookiesTest.kt b/tests/integration-tests/src/jvmTest/kotlin/test/CookiesTest.kt index 29daf959974..1428cc7caf7 100644 --- a/tests/integration-tests/src/jvmTest/kotlin/test/CookiesTest.kt +++ b/tests/integration-tests/src/jvmTest/kotlin/test/CookiesTest.kt @@ -5,10 +5,10 @@ import com.apollographql.apollo3.api.CustomScalarAdapters import com.apollographql.apollo3.api.json.buildJsonString import com.apollographql.apollo3.api.toJson import com.apollographql.apollo3.integration.normalizer.HeroNameQuery -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.okHttpClient import com.apollographql.apollo3.testing.internal.runTest import okhttp3.Cookie diff --git a/tests/integration-tests/src/jvmTest/kotlin/test/ExecutionContextTest.kt b/tests/integration-tests/src/jvmTest/kotlin/test/ExecutionContextTest.kt index 06f1633f418..c71c1a18165 100644 --- a/tests/integration-tests/src/jvmTest/kotlin/test/ExecutionContextTest.kt +++ b/tests/integration-tests/src/jvmTest/kotlin/test/ExecutionContextTest.kt @@ -5,9 +5,9 @@ import com.apollographql.apollo3.api.ExecutionContext import com.apollographql.apollo3.api.http.HttpRequest import com.apollographql.apollo3.api.http.HttpResponse import com.apollographql.apollo3.integration.normalizer.HeroNameQuery -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueError -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueError +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.http.DefaultHttpEngine import com.apollographql.apollo3.network.http.HttpEngine import com.apollographql.apollo3.testing.internal.runTest diff --git a/tests/integration-tests/src/jvmTest/kotlin/test/JvmFileUploadTest.kt b/tests/integration-tests/src/jvmTest/kotlin/test/JvmFileUploadTest.kt index 19b1ad1b642..1b21fabe98a 100644 --- a/tests/integration-tests/src/jvmTest/kotlin/test/JvmFileUploadTest.kt +++ b/tests/integration-tests/src/jvmTest/kotlin/test/JvmFileUploadTest.kt @@ -4,9 +4,9 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.Upload import com.apollographql.apollo3.api.toUpload import com.apollographql.apollo3.integration.upload.SingleUploadTwiceMutation -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.okHttpClient import com.apollographql.apollo3.testing.internal.runTest import okhttp3.OkHttpClient diff --git a/tests/integration-tests/src/jvmTest/kotlin/test/OkHttpClientTest.kt b/tests/integration-tests/src/jvmTest/kotlin/test/OkHttpClientTest.kt index 377c3f0beba..b031ceef9d2 100644 --- a/tests/integration-tests/src/jvmTest/kotlin/test/OkHttpClientTest.kt +++ b/tests/integration-tests/src/jvmTest/kotlin/test/OkHttpClientTest.kt @@ -2,10 +2,10 @@ package test import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.integration.normalizer.HeroNameQuery -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueError -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueError +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.okHttpClient import kotlinx.coroutines.runBlocking import okhttp3.Interceptor diff --git a/tests/integration-tests/src/jvmTest/kotlin/test/WriteToCacheAsynchronouslyTest.kt b/tests/integration-tests/src/jvmTest/kotlin/test/WriteToCacheAsynchronouslyTest.kt index 7fd8953c963..33c6899c7a2 100644 --- a/tests/integration-tests/src/jvmTest/kotlin/test/WriteToCacheAsynchronouslyTest.kt +++ b/tests/integration-tests/src/jvmTest/kotlin/test/WriteToCacheAsynchronouslyTest.kt @@ -8,8 +8,8 @@ import com.apollographql.apollo3.cache.normalized.store import com.apollographql.apollo3.cache.normalized.writeToCacheAsynchronously import com.apollographql.apollo3.integration.normalizer.HeroAndFriendsNamesQuery import com.apollographql.apollo3.integration.normalizer.type.Episode -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import kotlinx.coroutines.asCoroutineDispatcher import kotlinx.coroutines.withContext diff --git a/tests/ios-test/build.gradle.kts b/tests/ios-test/build.gradle.kts index 95798d68917..745abee7b22 100644 --- a/tests/ios-test/build.gradle.kts +++ b/tests/ios-test/build.gradle.kts @@ -16,13 +16,13 @@ kotlin { findByName("commonMain")?.apply { dependencies { implementation(libs.apollo.runtime) - implementation(libs.apollo.mockserver) } } findByName("commonTest")?.apply { dependencies { implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) } } } diff --git a/tests/ios-test/src/commonTest/kotlin/iOSTest.kt b/tests/ios-test/src/commonTest/kotlin/iOSTest.kt index dd0111ab11a..8965568b92b 100644 --- a/tests/ios-test/src/commonTest/kotlin/iOSTest.kt +++ b/tests/ios-test/src/commonTest/kotlin/iOSTest.kt @@ -1,8 +1,8 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.GlobalBuilder -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import ios.test.type.buildQuery import kotlin.test.Test diff --git a/tests/java-client/src/test/java/test/AutoPersistedQueriesTest.java b/tests/java-client/src/test/java/test/AutoPersistedQueriesTest.java index 23598e7a78c..367ba4998cc 100644 --- a/tests/java-client/src/test/java/test/AutoPersistedQueriesTest.java +++ b/tests/java-client/src/test/java/test/AutoPersistedQueriesTest.java @@ -1,11 +1,11 @@ package test; -import com.apollographql.apollo3.mockserver.MockServerKt; +import com.apollographql.mockserver.MockServerKt; import com.apollographql.apollo3.runtime.java.ApolloClient; import com.apollographql.apollo3.api.http.HttpMethod; -import com.apollographql.apollo3.mockserver.MockRequest; -import com.apollographql.apollo3.mockserver.MockResponse; -import com.apollographql.apollo3.mockserver.MockServer; +import com.apollographql.mockserver.MockRequest; +import com.apollographql.mockserver.MockResponse; +import com.apollographql.mockserver.MockServer; import com.apollographql.apollo3.rx3.java.Rx3Apollo; import io.reactivex.rxjava3.core.BackpressureStrategy; import javatest.GetRandomQuery; diff --git a/tests/java-client/src/test/java/test/BatchingTest.java b/tests/java-client/src/test/java/test/BatchingTest.java index 5de4831f9db..aed7d17ae2d 100644 --- a/tests/java-client/src/test/java/test/BatchingTest.java +++ b/tests/java-client/src/test/java/test/BatchingTest.java @@ -6,10 +6,10 @@ import com.apollographql.apollo3.api.CustomScalarAdapters; import com.apollographql.apollo3.api.http.HttpHeader; import com.apollographql.apollo3.api.json.BufferedSourceJsonReader; -import com.apollographql.apollo3.mockserver.MockRequest; -import com.apollographql.apollo3.mockserver.MockResponse; -import com.apollographql.apollo3.mockserver.MockServer; -import com.apollographql.apollo3.mockserver.MockServerKt; +import com.apollographql.mockserver.MockRequest; +import com.apollographql.mockserver.MockResponse; +import com.apollographql.mockserver.MockServer; +import com.apollographql.mockserver.MockServerKt; import com.apollographql.apollo3.runtime.java.ApolloCallback; import com.apollographql.apollo3.runtime.java.ApolloClient; import com.google.common.truth.Truth; diff --git a/tests/java-client/src/test/java/test/ClientTest.java b/tests/java-client/src/test/java/test/ClientTest.java index d127c4c78d4..e31762bd52f 100644 --- a/tests/java-client/src/test/java/test/ClientTest.java +++ b/tests/java-client/src/test/java/test/ClientTest.java @@ -4,10 +4,10 @@ import com.apollographql.apollo3.api.ApolloResponse; import com.apollographql.apollo3.api.Operation; import com.apollographql.apollo3.exception.ApolloHttpException; -import com.apollographql.apollo3.mockserver.MockRequestBase; -import com.apollographql.apollo3.mockserver.MockResponse; -import com.apollographql.apollo3.mockserver.MockServer; -import com.apollographql.apollo3.mockserver.MockServerKt; +import com.apollographql.mockserver.MockRequestBase; +import com.apollographql.mockserver.MockResponse; +import com.apollographql.mockserver.MockServer; +import com.apollographql.mockserver.MockServerKt; import com.apollographql.apollo3.runtime.java.ApolloCallback; import com.apollographql.apollo3.runtime.java.ApolloClient; import com.apollographql.apollo3.runtime.java.ApolloDisposable; diff --git a/tests/js/build.gradle.kts b/tests/js/build.gradle.kts index daf69acbe5b..f679497e60c 100644 --- a/tests/js/build.gradle.kts +++ b/tests/js/build.gradle.kts @@ -19,6 +19,7 @@ kotlin { findByName("commonTest")?.apply { dependencies { implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) } } } diff --git a/tests/jsexport/src/commonTest/kotlin/JsExportTest.kt b/tests/jsexport/src/commonTest/kotlin/JsExportTest.kt index d672f1d6e8a..3207cbebbde 100644 --- a/tests/jsexport/src/commonTest/kotlin/JsExportTest.kt +++ b/tests/jsexport/src/commonTest/kotlin/JsExportTest.kt @@ -7,11 +7,11 @@ import com.apollographql.apollo3.api.json.buildJsonString import com.apollographql.apollo3.api.json.jsonReader import com.apollographql.apollo3.api.json.readAny import com.apollographql.apollo3.api.json.writeAny -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.TextMessage -import com.apollographql.apollo3.mockserver.WebSocketMessage -import com.apollographql.apollo3.mockserver.awaitWebSocketRequest -import com.apollographql.apollo3.mockserver.enqueueWebSocket +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.TextMessage +import com.apollographql.mockserver.WebSocketMessage +import com.apollographql.mockserver.awaitWebSocketRequest +import com.apollographql.mockserver.enqueueWebSocket import com.apollographql.apollo3.network.websocket.SubscriptionParserFactory import com.apollographql.apollo3.network.websocket.WebSocketNetworkTransport import com.apollographql.apollo3.network.websocket.WsProtocol diff --git a/tests/models-operation-based-with-interfaces/build.gradle.kts b/tests/models-operation-based-with-interfaces/build.gradle.kts index 2322c5f49bb..c4ba109f8cf 100644 --- a/tests/models-operation-based-with-interfaces/build.gradle.kts +++ b/tests/models-operation-based-with-interfaces/build.gradle.kts @@ -12,6 +12,7 @@ dependencies { implementation(libs.apollo.runtime) implementation(libs.apollo.adapters) testImplementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.mockserver) testImplementation(libs.kotlin.test) } diff --git a/tests/models-operation-based-with-interfaces/src/test/kotlin/test/BasicTest.kt b/tests/models-operation-based-with-interfaces/src/test/kotlin/test/BasicTest.kt index 92f0cb816b1..06a8346dcea 100644 --- a/tests/models-operation-based-with-interfaces/src/test/kotlin/test/BasicTest.kt +++ b/tests/models-operation-based-with-interfaces/src/test/kotlin/test/BasicTest.kt @@ -13,8 +13,8 @@ import com.apollographql.apollo3.cache.normalized.FetchPolicy import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.fetchPolicy import com.apollographql.apollo3.cache.normalized.store -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import testFixtureToUtf8 import kotlin.test.Test diff --git a/tests/models-operation-based-with-interfaces/src/test/kotlin/test/StoreTest.kt b/tests/models-operation-based-with-interfaces/src/test/kotlin/test/StoreTest.kt index 53e8e10b225..b70537f39b4 100644 --- a/tests/models-operation-based-with-interfaces/src/test/kotlin/test/StoreTest.kt +++ b/tests/models-operation-based-with-interfaces/src/test/kotlin/test/StoreTest.kt @@ -12,8 +12,8 @@ import com.apollographql.apollo3.cache.normalized.ApolloStore import com.apollographql.apollo3.cache.normalized.api.CacheKey import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.store -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import testFixtureToUtf8 import kotlin.test.Test diff --git a/tests/models-operation-based/build.gradle.kts b/tests/models-operation-based/build.gradle.kts index 8af48e89f82..918884f1af7 100644 --- a/tests/models-operation-based/build.gradle.kts +++ b/tests/models-operation-based/build.gradle.kts @@ -18,6 +18,7 @@ kotlin { findByName("commonTest")?.apply { dependencies { implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) } } diff --git a/tests/models-operation-based/src/commonTest/kotlin/test/BasicTest.kt b/tests/models-operation-based/src/commonTest/kotlin/test/BasicTest.kt index 92f0cb816b1..06a8346dcea 100644 --- a/tests/models-operation-based/src/commonTest/kotlin/test/BasicTest.kt +++ b/tests/models-operation-based/src/commonTest/kotlin/test/BasicTest.kt @@ -13,8 +13,8 @@ import com.apollographql.apollo3.cache.normalized.FetchPolicy import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.fetchPolicy import com.apollographql.apollo3.cache.normalized.store -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import testFixtureToUtf8 import kotlin.test.Test diff --git a/tests/models-operation-based/src/commonTest/kotlin/test/StoreTest.kt b/tests/models-operation-based/src/commonTest/kotlin/test/StoreTest.kt index 0e61557765e..14a291b3478 100644 --- a/tests/models-operation-based/src/commonTest/kotlin/test/StoreTest.kt +++ b/tests/models-operation-based/src/commonTest/kotlin/test/StoreTest.kt @@ -12,8 +12,8 @@ import com.apollographql.apollo3.cache.normalized.ApolloStore import com.apollographql.apollo3.cache.normalized.api.CacheKey import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.store -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import testFixtureToUtf8 import kotlin.test.Test diff --git a/tests/models-response-based/build.gradle.kts b/tests/models-response-based/build.gradle.kts index 44a72cdbc53..402ed077e53 100644 --- a/tests/models-response-based/build.gradle.kts +++ b/tests/models-response-based/build.gradle.kts @@ -18,6 +18,7 @@ kotlin { findByName("commonTest")?.apply { dependencies { implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) } } } diff --git a/tests/models-response-based/src/commonTest/kotlin/test/BasicTest.kt b/tests/models-response-based/src/commonTest/kotlin/test/BasicTest.kt index 14179d33ca1..aa2e4e3070f 100644 --- a/tests/models-response-based/src/commonTest/kotlin/test/BasicTest.kt +++ b/tests/models-response-based/src/commonTest/kotlin/test/BasicTest.kt @@ -18,8 +18,8 @@ import com.apollographql.apollo3.cache.normalized.FetchPolicy import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.fetchPolicy import com.apollographql.apollo3.cache.normalized.store -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import testFixtureToUtf8 import kotlin.test.Test diff --git a/tests/models-response-based/src/commonTest/kotlin/test/StoreTest.kt b/tests/models-response-based/src/commonTest/kotlin/test/StoreTest.kt index 98889b3bb4e..b622800912f 100644 --- a/tests/models-response-based/src/commonTest/kotlin/test/StoreTest.kt +++ b/tests/models-response-based/src/commonTest/kotlin/test/StoreTest.kt @@ -13,8 +13,8 @@ import com.apollographql.apollo3.cache.normalized.ApolloStore import com.apollographql.apollo3.cache.normalized.api.CacheKey import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.store -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import testFixtureToUtf8 import kotlin.test.Test diff --git a/tests/multipart/build.gradle.kts b/tests/multipart/build.gradle.kts index e8315961506..33c522932ca 100644 --- a/tests/multipart/build.gradle.kts +++ b/tests/multipart/build.gradle.kts @@ -16,6 +16,7 @@ kotlin { findByName("commonTest")?.apply { dependencies { implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) implementation(libs.turbine) } } diff --git a/tests/multipart/src/commonTest/kotlin/test/GraphQLYogaTest.kt b/tests/multipart/src/commonTest/kotlin/test/GraphQLYogaTest.kt index ecb3bb29e54..334ceecbe47 100644 --- a/tests/multipart/src/commonTest/kotlin/test/GraphQLYogaTest.kt +++ b/tests/multipart/src/commonTest/kotlin/test/GraphQLYogaTest.kt @@ -1,8 +1,8 @@ package test import com.apollographql.apollo3.ApolloClient -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer import com.apollographql.apollo3.testing.internal.runTest import kotlinx.coroutines.CoroutineScope import multipart.MyQuery diff --git a/tests/multipart/src/commonTest/kotlin/test/MultipartSubscriptionsMockServerTest.kt b/tests/multipart/src/commonTest/kotlin/test/MultipartSubscriptionsMockServerTest.kt index 0873a72c565..6622e70750c 100644 --- a/tests/multipart/src/commonTest/kotlin/test/MultipartSubscriptionsMockServerTest.kt +++ b/tests/multipart/src/commonTest/kotlin/test/MultipartSubscriptionsMockServerTest.kt @@ -4,8 +4,8 @@ import app.cash.turbine.test import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.ApolloResponse import com.apollographql.apollo3.exception.RouterError -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer import com.apollographql.apollo3.mpp.Platform import com.apollographql.apollo3.mpp.platform import com.apollographql.apollo3.network.http.HttpNetworkTransport diff --git a/tests/native-benchmarks/src/appleTest/kotlin/benchmarks/BenchmarksTest.kt b/tests/native-benchmarks/src/appleTest/kotlin/benchmarks/BenchmarksTest.kt index fbcd51a6c53..4d7930a19cc 100644 --- a/tests/native-benchmarks/src/appleTest/kotlin/benchmarks/BenchmarksTest.kt +++ b/tests/native-benchmarks/src/appleTest/kotlin/benchmarks/BenchmarksTest.kt @@ -4,8 +4,8 @@ import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.toResponseJson import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.normalizedCache -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import okio.FileSystem import okio.Path.Companion.toPath diff --git a/tests/no-query-document/build.gradle.kts b/tests/no-query-document/build.gradle.kts index 5e4db429402..d251ed55411 100644 --- a/tests/no-query-document/build.gradle.kts +++ b/tests/no-query-document/build.gradle.kts @@ -7,8 +7,8 @@ apolloTest() dependencies { implementation(libs.apollo.runtime) - implementation(libs.apollo.mockserver) implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) testImplementation(libs.kotlin.test) testImplementation(libs.junit) } diff --git a/tests/no-query-document/src/test/kotlin/test/NoQueryDocumentTest.kt b/tests/no-query-document/src/test/kotlin/test/NoQueryDocumentTest.kt index db807de3be5..26b3f6ab80a 100644 --- a/tests/no-query-document/src/test/kotlin/test/NoQueryDocumentTest.kt +++ b/tests/no-query-document/src/test/kotlin/test/NoQueryDocumentTest.kt @@ -12,10 +12,10 @@ import com.apollographql.apollo3.api.json.buildJsonByteString import com.apollographql.apollo3.api.json.jsonReader import com.apollographql.apollo3.api.json.readAny import com.apollographql.apollo3.api.json.writeObject -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueError -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueError +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.network.http.HttpNetworkTransport import com.apollographql.apollo3.testing.internal.runTest import okio.Buffer diff --git a/tests/no-runtime/build.gradle.kts b/tests/no-runtime/build.gradle.kts index 9694dd538d5..f755b308ab8 100644 --- a/tests/no-runtime/build.gradle.kts +++ b/tests/no-runtime/build.gradle.kts @@ -8,7 +8,7 @@ apolloTest() dependencies { implementation(libs.apollo.api) implementation(project(":sample-server")) - implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) testImplementation(libs.kotlin.test) testImplementation(libs.junit) testImplementation(libs.okhttp) diff --git a/tests/normalization-tests/build.gradle.kts b/tests/normalization-tests/build.gradle.kts index 2e316c3b7de..f51badb83f7 100644 --- a/tests/normalization-tests/build.gradle.kts +++ b/tests/normalization-tests/build.gradle.kts @@ -7,9 +7,9 @@ apolloTest() dependencies { implementation(libs.apollo.runtime) - implementation(libs.apollo.mockserver) implementation(libs.apollo.normalizedcache) - implementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.mockserver) testImplementation(libs.kotlin.test) testImplementation(libs.junit) } diff --git a/tests/normalization-tests/src/test/kotlin/com/example/NormalizationTest.kt b/tests/normalization-tests/src/test/kotlin/com/example/NormalizationTest.kt index 2219d4809fe..765896ab108 100644 --- a/tests/normalization-tests/src/test/kotlin/com/example/NormalizationTest.kt +++ b/tests/normalization-tests/src/test/kotlin/com/example/NormalizationTest.kt @@ -21,8 +21,8 @@ import com.apollographql.apollo3.cache.normalized.apolloStore import com.apollographql.apollo3.cache.normalized.fetchPolicy import com.apollographql.apollo3.cache.normalized.normalizedCache import com.apollographql.apollo3.cache.normalized.store -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import com.example.one.Issue2818Query import com.example.one.Issue3672Query diff --git a/tests/optimistic-data/build.gradle.kts b/tests/optimistic-data/build.gradle.kts index fce391c4679..acf665b9268 100644 --- a/tests/optimistic-data/build.gradle.kts +++ b/tests/optimistic-data/build.gradle.kts @@ -9,6 +9,7 @@ dependencies { implementation(libs.apollo.runtime) implementation(libs.apollo.normalizedcache) testImplementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.mockserver) testImplementation(libs.kotlin.test) testImplementation(libs.turbine) } diff --git a/tests/optimistic-data/src/test/kotlin/test/OptimisticDataTest.kt b/tests/optimistic-data/src/test/kotlin/test/OptimisticDataTest.kt index 98304594a9b..fa13eca2771 100644 --- a/tests/optimistic-data/src/test/kotlin/test/OptimisticDataTest.kt +++ b/tests/optimistic-data/src/test/kotlin/test/OptimisticDataTest.kt @@ -6,9 +6,9 @@ import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.normalizedCache import com.apollographql.apollo3.cache.normalized.optimisticUpdates import com.apollographql.apollo3.cache.normalized.watch -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import kotlinx.coroutines.delay import kotlinx.coroutines.flow.filterNotNull import kotlinx.coroutines.flow.map diff --git a/tests/pagination/build.gradle.kts b/tests/pagination/build.gradle.kts index 38ac2c73dd3..013409d65cb 100644 --- a/tests/pagination/build.gradle.kts +++ b/tests/pagination/build.gradle.kts @@ -21,6 +21,7 @@ kotlin { dependencies { implementation(libs.atomicfu.library) implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) implementation(libs.apollo.normalizedcache.incubating) implementation(libs.apollo.normalizedcache.sqlite.incubating) } diff --git a/tests/platform-api/build.gradle.kts b/tests/platform-api/build.gradle.kts index 01a206d46ec..debaddbb610 100644 --- a/tests/platform-api/build.gradle.kts +++ b/tests/platform-api/build.gradle.kts @@ -13,6 +13,7 @@ dependencies { implementation(libs.apollo.tooling) testImplementation(libs.kotlin.test) testImplementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.mockserver) } val apiKey = System.getenv("PLATFORM_API_TESTS_KEY") diff --git a/tests/runtime/build.gradle.kts b/tests/runtime/build.gradle.kts index b6ad5147172..ebfe51bdcee 100644 --- a/tests/runtime/build.gradle.kts +++ b/tests/runtime/build.gradle.kts @@ -10,7 +10,8 @@ apolloTest() dependencies { implementation(libs.apollo.runtime) implementation(project(":sample-server")) - implementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.mockserver) testImplementation(libs.kotlin.test) testImplementation(libs.junit) testImplementation(libs.okhttp) diff --git a/tests/runtime/src/test/kotlin/test/HeadersTest.kt b/tests/runtime/src/test/kotlin/test/HeadersTest.kt index b97689bcb26..7c071e97a99 100644 --- a/tests/runtime/src/test/kotlin/test/HeadersTest.kt +++ b/tests/runtime/src/test/kotlin/test/HeadersTest.kt @@ -3,9 +3,9 @@ package test import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.composeJsonResponse import com.apollographql.apollo3.api.http.HttpHeader -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.awaitRequest -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.awaitRequest +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import com.example.GetRandomQuery import org.junit.Test diff --git a/tests/rxjava/src/test/kotlin/RxJavaTest.kt b/tests/rxjava/src/test/kotlin/RxJavaTest.kt index 59f99bb22a9..ac84a5a9c2c 100644 --- a/tests/rxjava/src/test/kotlin/RxJavaTest.kt +++ b/tests/rxjava/src/test/kotlin/RxJavaTest.kt @@ -4,8 +4,8 @@ import com.apollographql.apollo3.cache.normalized.api.MemoryCacheFactory import com.apollographql.apollo3.cache.normalized.store import com.apollographql.apollo3.exception.CacheMissException import com.apollographql.apollo3.exception.JsonEncodingException -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import kotlinx.coroutines.runBlocking import kotlinx.coroutines.rx2.asFlowable import rxjava.GetRandomQuery diff --git a/tests/scalar-adapters/build.gradle.kts b/tests/scalar-adapters/build.gradle.kts index b284d0d3865..4ed6467179f 100644 --- a/tests/scalar-adapters/build.gradle.kts +++ b/tests/scalar-adapters/build.gradle.kts @@ -9,6 +9,7 @@ dependencies { implementation(libs.apollo.runtime) implementation(libs.apollo.adapters) testImplementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.mockserver) testImplementation(libs.kotlin.test) } diff --git a/tests/scalar-adapters/src/test/kotlin/test/CustomScalarTest.kt b/tests/scalar-adapters/src/test/kotlin/test/CustomScalarTest.kt index e2743879512..f2601624409 100644 --- a/tests/scalar-adapters/src/test/kotlin/test/CustomScalarTest.kt +++ b/tests/scalar-adapters/src/test/kotlin/test/CustomScalarTest.kt @@ -7,8 +7,8 @@ import com.apollographql.apollo3.api.CustomScalarAdapters import com.apollographql.apollo3.api.json.JsonReader import com.apollographql.apollo3.api.json.JsonWriter import com.apollographql.apollo3.api.json.writeObject -import com.apollographql.apollo3.mockserver.MockServer -import com.apollographql.apollo3.mockserver.enqueueString +import com.apollographql.mockserver.MockServer +import com.apollographql.mockserver.enqueueString import com.apollographql.apollo3.testing.internal.runTest import custom.scalars.Address import custom.scalars.AddressQuery diff --git a/tests/schema-changes/build.gradle.kts b/tests/schema-changes/build.gradle.kts index 2cc2a601697..0ac86569337 100644 --- a/tests/schema-changes/build.gradle.kts +++ b/tests/schema-changes/build.gradle.kts @@ -9,6 +9,7 @@ dependencies { implementation(libs.apollo.runtime) implementation(libs.apollo.normalizedcache) testImplementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.mockserver) testImplementation(libs.kotlin.test) testImplementation(libs.turbine) } diff --git a/tests/sqlite/build.gradle.kts b/tests/sqlite/build.gradle.kts index 254cb873fce..66c47e3cce0 100644 --- a/tests/sqlite/build.gradle.kts +++ b/tests/sqlite/build.gradle.kts @@ -18,6 +18,7 @@ kotlin { findByName("commonTest")?.apply { dependencies { implementation(libs.apollo.testingsupport) + implementation(libs.apollo.mockserver) implementation(libs.apollo.normalizedcache.incubating) implementation(libs.apollo.normalizedcache.sqlite.incubating) } diff --git a/tests/sqlite/src/commonTest/kotlin/ExpirationTest.kt b/tests/sqlite/src/commonTest/kotlin/ExpirationTest.kt index fbf5e502dd2..995f1751520 100644 --- a/tests/sqlite/src/commonTest/kotlin/ExpirationTest.kt +++ b/tests/sqlite/src/commonTest/kotlin/ExpirationTest.kt @@ -20,8 +20,8 @@ import com.apollographql.apollo3.cache.normalized.sql.SqlNormalizedCacheFactory import com.apollographql.apollo3.cache.normalized.storeExpirationDate import com.apollographql.apollo3.cache.normalized.storeReceiveDate import com.apollographql.apollo3.exception.CacheMissException -import com.apollographql.apollo3.mockserver.MockResponse -import com.apollographql.apollo3.mockserver.MockServer +import com.apollographql.mockserver.MockResponse +import com.apollographql.mockserver.MockServer import com.apollographql.apollo3.mpp.currentTimeMillis import com.apollographql.apollo3.testing.internal.runTest import sqlite.GetUserQuery diff --git a/tests/test-network-transport/build.gradle.kts b/tests/test-network-transport/build.gradle.kts index 2348eecfa47..50ea8f968c7 100644 --- a/tests/test-network-transport/build.gradle.kts +++ b/tests/test-network-transport/build.gradle.kts @@ -9,11 +9,11 @@ apolloTest() dependencies { implementation(libs.apollo.runtime) - implementation(libs.apollo.mockserver) + testImplementation(libs.apollo.testingsupport) testImplementation(libs.kotlin.test) testImplementation(libs.junit) testImplementation(libs.turbine) - testImplementation(libs.apollo.testingsupport) + testImplementation(libs.apollo.mockserver) } apollo { diff --git a/tests/websockets/build.gradle.kts b/tests/websockets/build.gradle.kts index bb7b5c6b16d..55ddad38daa 100644 --- a/tests/websockets/build.gradle.kts +++ b/tests/websockets/build.gradle.kts @@ -15,6 +15,7 @@ kotlin { findByName("commonTest")?.apply { dependencies { + implementation(libs.apollo.mockserver) implementation(libs.apollo.testingsupport) implementation(libs.apollo.normalizedcache) implementation(libs.turbine)