morristech
10/14/2018 - 2:02 PM

TestApplicationModule.java

@Module
public class TestApplicationModule extends ApplicationModule {

    public TestApplicationModule(Application application) {
        super(application);
    }

    @Provides
    @Singleton
    public Retrofit getRetrofit(OkHttpClient client) {
        return new Retrofit.Builder()
                .addConverterFactory(GsonConverterFactory.create())
                .client(client)
                .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
                .baseUrl("http://localhost:8080/")
                .build();
    }

}