@Test public void testForecastGetHighTemperature() throws Exception { OpenWeatherMapWeather weather = WeatherUtils.createOpenWeather(context); List<WeatherCondition> conditions = weather.getConditions(); assertEquals(8, conditions.size()); assertEquals(289, conditions.get(0).getTemperature(TemperatureUnit.K).getHigh()); assertEquals(295, conditions.get(1).getTemperature(TemperatureUnit.K).getHigh()); assertEquals(296, conditions.get(2).getTemperature(TemperatureUnit.K).getHigh()); assertEquals(298, conditions.get(3).getTemperature(TemperatureUnit.K).getHigh()); assertEquals(299, conditions.get(4).getTemperature(TemperatureUnit.K).getHigh()); assertEquals(299, conditions.get(5).getTemperature(TemperatureUnit.K).getHigh()); assertEquals(296, conditions.get(6).getTemperature(TemperatureUnit.K).getHigh()); assertEquals(300, conditions.get(7).getTemperature(TemperatureUnit.K).getHigh()); }
@Override public List<WeatherCondition> getConditions() { return Collections.unmodifiableList(new ArrayList<WeatherCondition>(this.conditions)); }
OpenWeatherMapWeather implements Weather { @Override public List<WeatherCondition> getConditions() { return Collections.unmodifiableList(new ArrayList<WeatherCondition>(this.conditions)); } }
OpenWeatherMapWeather implements Weather { @Override public List<WeatherCondition> getConditions() { return Collections.unmodifiableList(new ArrayList<WeatherCondition>(this.conditions)); } OpenWeatherMapWeather(Context context);  OpenWeatherMapWeather(Context context, JSONObject jsonObject); }
OpenWeatherMapWeather implements Weather { @Override public List<WeatherCondition> getConditions() { return Collections.unmodifiableList(new ArrayList<WeatherCondition>(this.conditions)); } OpenWeatherMapWeather(Context context);  OpenWeatherMapWeather(Context context, JSONObject jsonObject); @Override Location getLocation(); @Override Date getTime(); @Override Date getQueryTime(); @Override UnitSystem getUnitSystem(); @Override List<WeatherCondition> getConditions(); @Override boolean isEmpty(); int getCityId(); URL getForecastURL(); }
OpenWeatherMapWeather implements Weather { @Override public List<WeatherCondition> getConditions() { return Collections.unmodifiableList(new ArrayList<WeatherCondition>(this.conditions)); } OpenWeatherMapWeather(Context context);  OpenWeatherMapWeather(Context context, JSONObject jsonObject); @Override Location getLocation(); @Override Date getTime(); @Override Date getQueryTime(); @Override UnitSystem getUnitSystem(); @Override List<WeatherCondition> getConditions(); @Override boolean isEmpty(); int getCityId(); URL getForecastURL();  }