use of com.apollographql.apollo.cache.normalized.lru.LruNormalizedCacheFactory in project apollo-android by apollographql.
the class ResponseNormalizationTest method setUp.
@Before
public void setUp() {
OkHttpClient okHttpClient = new OkHttpClient.Builder().dispatcher(new Dispatcher(Utils.immediateExecutorService())).build();
apolloClient = ApolloClient.builder().serverUrl(server.url("/")).okHttpClient(okHttpClient).normalizedCache(new LruNormalizedCacheFactory(EvictionPolicy.NO_EVICTION), new IdFieldCacheKeyResolver()).dispatcher(Utils.immediateExecutor()).build();
normalizedCache = apolloClient.apolloStore().normalizedCache();
}
use of com.apollographql.apollo.cache.normalized.lru.LruNormalizedCacheFactory in project apollo-android by apollographql.
the class QueryRefetchTest method setUp.
@Before
public void setUp() throws IOException {
server = new MockWebServer();
server.start();
OkHttpClient okHttpClient = new OkHttpClient.Builder().dispatcher(new Dispatcher(Utils.immediateExecutorService())).build();
apolloClient = ApolloClient.builder().serverUrl(server.url("/")).dispatcher(Utils.immediateExecutor()).okHttpClient(okHttpClient).normalizedCache(new LruNormalizedCacheFactory(EvictionPolicy.NO_EVICTION), new IdFieldCacheKeyResolver()).build();
}
Aggregations