use of com.octo.android.robospice.retrofit.test.stub.RetrofitSpiceRequestStub in project robospice by stephanenicolas.
the class RetrofitGsonSpiceServiceTest method test_addRequest_injects_request_factory.
public void test_addRequest_injects_request_factory() throws InterruptedException {
// given
spiceManager.start(getContext());
RetrofitSpiceRequestStub retrofitSpiceRequestStub = new RetrofitSpiceRequestStub(WeatherResult.class);
// when
spiceManager.execute(retrofitSpiceRequestStub, new RequestListenerStub<WeatherResult>());
retrofitSpiceRequestStub.await(REQUEST_COMPLETION_TIMEOUT);
// test
assertNotNull(retrofitSpiceRequestStub.getService());
}
use of com.octo.android.robospice.retrofit.test.stub.RetrofitSpiceRequestStub in project robospice by stephanenicolas.
the class RetrofitJackson2SpiceServiceTest method test_addRequest_injects_request_factory.
public void test_addRequest_injects_request_factory() throws InterruptedException {
// given
spiceManager.start(getContext());
RetrofitSpiceRequestStub retrofitSpiceRequestStub = new RetrofitSpiceRequestStub(WeatherResult.class);
// when
spiceManager.execute(retrofitSpiceRequestStub, new RequestListenerStub<WeatherResult>());
retrofitSpiceRequestStub.await(REQUEST_COMPLETION_TIMEOUT);
// test
assertNotNull(retrofitSpiceRequestStub.getService());
}
Aggregations