Mock server requires a lot of boilerplate and locked into http protocol. Similar to Mock retrofit, would be amazing mock with test builders directly in ApolloClient query layer. Would then not need Idle resources or mock http server.
Similar concept having whenever(apollo.query()).assertThat(data, queryBuilder {}) instead
would be neat inject this with Dagger into unit test and instrumentation test as androidx Room or Retrofit mock provides. As a separate implementation of ApolloClient as MockApolloClient. With your own coroutine dispatchers with new runTest{} api in Kotlin Test. And then inside provide in memory data with similar hamcrest or Kotlin DSL.
Mock server requires a lot of boilerplate and locked into http protocol. Similar to Mock retrofit, would be amazing mock with test builders directly in ApolloClient query layer. Would then not need Idle resources or mock http server.
Similar concept having
whenever(apollo.query()).assertThat(data, queryBuilder {})
instead would be neat inject this with Dagger into unit test and instrumentation test as androidx Room or Retrofit mock provides. As a separate implementation of ApolloClient as MockApolloClient. With your own coroutine dispatchers with new runTest{} api in Kotlin Test. And then inside provide in memory data with similar hamcrest or Kotlin DSL.