Search in sources :

Example 1 with Weather

use of com.octo.android.robospice.googlehttpclient.test.model.Weather 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)

Example 2 with Weather

use of com.octo.android.robospice.googlehttpclient.test.model.Weather in project robospice by stephanenicolas.

the class JsonObjectPersisterFactoryTest method buildWeather.

private WeatherResult buildWeather(String temp, String tempUnit) {
    WeatherResult weatherRequestStatus = new WeatherResult();
    Weather weather = new Weather();
    List<CurrenWeather> currents = new ArrayList<CurrenWeather>();
    CurrenWeather current_weather = new CurrenWeather();
    current_weather.setTemp(temp);
    current_weather.setTemp_unit(tempUnit);
    currents.add(current_weather);
    weather.setCurren_weather(currents);
    weatherRequestStatus.setWeather(weather);
    return weatherRequestStatus;
}
Also used : CurrenWeather(com.octo.android.robospice.googlehttpclient.test.model.CurrenWeather) Weather(com.octo.android.robospice.googlehttpclient.test.model.Weather) CurrenWeather(com.octo.android.robospice.googlehttpclient.test.model.CurrenWeather) WeatherResult(com.octo.android.robospice.googlehttpclient.test.model.WeatherResult) ArrayList(java.util.ArrayList)

Aggregations

Weather (com.octo.android.robospice.googlehttpclient.test.model.Weather)2 CurrenWeather (com.octo.android.robospice.googlehttpclient.test.model.CurrenWeather)1 WeatherResult (com.octo.android.robospice.googlehttpclient.test.model.WeatherResult)1 GoogleHttpClientSpiceRequestStub (com.octo.android.robospice.googlehttpclient.test.stub.GoogleHttpClientSpiceRequestStub)1 ArrayList (java.util.ArrayList)1