Search in sources :

Example 1 with Weather

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

Example 2 with Weather

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

the class InFileWeatherPersisterTest 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 : Weather(com.octo.android.robospice.springandroid.test.model.json.Weather) CurrenWeather(com.octo.android.robospice.springandroid.test.model.json.CurrenWeather) CurrenWeather(com.octo.android.robospice.springandroid.test.model.json.CurrenWeather) WeatherResult(com.octo.android.robospice.springandroid.test.model.json.WeatherResult) ArrayList(java.util.ArrayList)

Example 3 with Weather

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

the class InFileWeatherPersisterTest 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 : Weather(com.octo.android.robospice.springandroid.test.model.json.Weather) CurrenWeather(com.octo.android.robospice.springandroid.test.model.json.CurrenWeather) CurrenWeather(com.octo.android.robospice.springandroid.test.model.json.CurrenWeather) WeatherResult(com.octo.android.robospice.springandroid.test.model.json.WeatherResult) ArrayList(java.util.ArrayList)

Example 4 with Weather

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

the class InFileWeatherPersisterTest 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 : Weather(com.octo.android.robospice.springandroid.test.model.json.Weather) CurrenWeather(com.octo.android.robospice.springandroid.test.model.json.CurrenWeather) CurrenWeather(com.octo.android.robospice.springandroid.test.model.json.CurrenWeather) WeatherResult(com.octo.android.robospice.springandroid.test.model.json.WeatherResult) ArrayList(java.util.ArrayList)

Aggregations

Weather (com.octo.android.robospice.springandroid.test.model.json.Weather)4 CurrenWeather (com.octo.android.robospice.springandroid.test.model.json.CurrenWeather)3 WeatherResult (com.octo.android.robospice.springandroid.test.model.json.WeatherResult)3 ArrayList (java.util.ArrayList)3 SpringAndroidSpiceRequestStub (com.octo.android.robospice.springandroid.test.stub.SpringAndroidSpiceRequestStub)1