Search in sources :

Example 1 with SpringAndroidSpiceRequestStub

use of com.octo.android.robospice.springandroid.test.stub.SpringAndroidSpiceRequestStub in project robospice by stephanenicolas.

the class SpringAndroidSpiceServiceTest method test_addRequest_injects_request_factory.

public void test_addRequest_injects_request_factory() throws InterruptedException {
    // given
    spiceManager.start(getContext());
    SpringAndroidSpiceRequestStub springAndroidSpiceRequest = new SpringAndroidSpiceRequestStub(Weather.class);
    // when
    spiceManager.execute(springAndroidSpiceRequest, new RequestListenerStub<Weather>());
    springAndroidSpiceRequest.await(REQUEST_COMPLETION_TIMEOUT);
    // test
    assertNotNull(springAndroidSpiceRequest.getRestTemplate());
}
Also used : SpringAndroidSpiceRequestStub(com.octo.android.robospice.springandroid.test.stub.SpringAndroidSpiceRequestStub) Weather(com.octo.android.robospice.springandroid.test.model.json.Weather)

Aggregations

Weather (com.octo.android.robospice.springandroid.test.model.json.Weather)1 SpringAndroidSpiceRequestStub (com.octo.android.robospice.springandroid.test.stub.SpringAndroidSpiceRequestStub)1