Search in sources :

Example 1 with GoogleHttpClientSpiceRequestStub

use of com.octo.android.robospice.googlehttpclient.test.stub.GoogleHttpClientSpiceRequestStub in project robospice by stephanenicolas.

the class GoogleHttpClientSpiceServiceTest method test_addRequest_injects_request_factory.

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

Aggregations

Weather (com.octo.android.robospice.googlehttpclient.test.model.Weather)1 GoogleHttpClientSpiceRequestStub (com.octo.android.robospice.googlehttpclient.test.stub.GoogleHttpClientSpiceRequestStub)1