Search in sources :

Example 1 with OnlyIfCachedStrippingInterceptor

use of org.edx.mobile.http.interceptor.OnlyIfCachedStrippingInterceptor in project edx-app-android by edx.

the class HttpBaseTestCase method setUp.

@Override
public void setUp() throws Exception {
    server = new MockWebServer();
    server.setDispatcher(new MockResponseDispatcher());
    server.start();
    okHttpClient = new OkHttpClient.Builder().dispatcher(new Dispatcher(new RoboExecutorService())).addInterceptor(new JsonMergePatchInterceptor()).addInterceptor(new OnlyIfCachedStrippingInterceptor()).build();
    super.setUp();
}
Also used : OkHttpClient(okhttp3.OkHttpClient) JsonMergePatchInterceptor(org.edx.mobile.http.interceptor.JsonMergePatchInterceptor) OnlyIfCachedStrippingInterceptor(org.edx.mobile.http.interceptor.OnlyIfCachedStrippingInterceptor) MockWebServer(okhttp3.mockwebserver.MockWebServer) Dispatcher(okhttp3.Dispatcher) RoboExecutorService(org.robolectric.util.concurrent.RoboExecutorService)

Aggregations

Dispatcher (okhttp3.Dispatcher)1 OkHttpClient (okhttp3.OkHttpClient)1 MockWebServer (okhttp3.mockwebserver.MockWebServer)1 JsonMergePatchInterceptor (org.edx.mobile.http.interceptor.JsonMergePatchInterceptor)1 OnlyIfCachedStrippingInterceptor (org.edx.mobile.http.interceptor.OnlyIfCachedStrippingInterceptor)1 RoboExecutorService (org.robolectric.util.concurrent.RoboExecutorService)1