use of retrofit2.Retrofit in project retrofit by square.
the class GsonConverterFactoryTest method setUp.
@Before
public void setUp() {
Gson gson = new GsonBuilder().registerTypeAdapter(AnInterface.class, new AnInterfaceAdapter()).setLenient().create();
Retrofit retrofit = new Retrofit.Builder().baseUrl(server.url("/")).addConverterFactory(GsonConverterFactory.create(gson)).build();
service = retrofit.create(Service.class);
}
use of retrofit2.Retrofit in project retrofit by square.
the class SingleTest method setUp.
@Before
public void setUp() {
Retrofit retrofit = new Retrofit.Builder().baseUrl(server.url("/")).addConverterFactory(new StringConverterFactory()).addCallAdapterFactory(RxJava2CallAdapterFactory.create()).build();
service = retrofit.create(Service.class);
}
use of retrofit2.Retrofit in project retrofit by square.
the class SingleWithSchedulerTest method setUp.
@Before
public void setUp() {
Retrofit retrofit = new Retrofit.Builder().baseUrl(server.url("/")).addConverterFactory(new StringConverterFactory()).addCallAdapterFactory(RxJava2CallAdapterFactory.createWithScheduler(scheduler)).build();
service = retrofit.create(Service.class);
}
use of retrofit2.Retrofit in project retrofit by square.
the class MaybeWithSchedulerTest method setUp.
@Before
public void setUp() {
Retrofit retrofit = new Retrofit.Builder().baseUrl(server.url("/")).addConverterFactory(new StringConverterFactory()).addCallAdapterFactory(RxJava2CallAdapterFactory.createWithScheduler(scheduler)).build();
service = retrofit.create(Service.class);
}
use of retrofit2.Retrofit in project retrofit by square.
the class ObservableTest method setUp.
@Before
public void setUp() {
Retrofit retrofit = new Retrofit.Builder().baseUrl(server.url("/")).addConverterFactory(new StringConverterFactory()).addCallAdapterFactory(RxJava2CallAdapterFactory.create()).build();
service = retrofit.create(Service.class);
}
Aggregations