@Test public void testForecastGetHumidity() throws Exception { OpenWeatherMapWeather weather = WeatherUtils.createOpenWeather(context); List<WeatherCondition> conditions = weather.getConditions(); assertEquals(8, conditions.size()); assertEquals(44, conditions.get(0).getHumidity().getValue()); assertEquals(46, conditions.get(1).getHumidity().getValue()); assertEquals(38, conditions.get(2).getHumidity().getValue()); assertEquals(42, conditions.get(3).getHumidity().getValue()); assertEquals(51, conditions.get(4).getHumidity().getValue()); assertEquals(41, conditions.get(5).getHumidity().getValue()); assertEquals(42, conditions.get(6).getHumidity().getValue()); assertEquals(48, conditions.get(7).getHumidity().getValue()); }
@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();  }