@Test public void testForecastGetConditionTypes() throws Exception { OpenWeatherMapWeather weather = WeatherUtils.createOpenWeather(context); List<SimpleWeatherCondition> conditions = weather.getOpenWeatherMapConditions(); assertEquals(8, conditions.size()); assertEquals(1, conditions.get(0).getConditionTypes().size()); assertTrue(conditions.get(0).getConditionTypes().contains(WeatherConditionType.CLOUDS_SCATTERED)); assertEquals(1, conditions.get(1).getConditionTypes().size()); assertTrue(conditions.get(1).getConditionTypes().contains(WeatherConditionType.RAIN_LIGHT)); assertEquals(1, conditions.get(2).getConditionTypes().size()); assertTrue(conditions.get(2).getConditionTypes().contains(WeatherConditionType.CLOUDS_SCATTERED)); assertEquals(1, conditions.get(3).getConditionTypes().size()); assertTrue(conditions.get(3).getConditionTypes().contains(WeatherConditionType.CLOUDS_BROKEN)); assertEquals(1, conditions.get(4).getConditionTypes().size()); assertTrue(conditions.get(4).getConditionTypes().contains(WeatherConditionType.RAIN_LIGHT)); assertEquals(1, conditions.get(5).getConditionTypes().size()); assertTrue(conditions.get(5).getConditionTypes().contains(WeatherConditionType.RAIN_LIGHT)); assertEquals(1, conditions.get(6).getConditionTypes().size()); assertTrue(conditions.get(6).getConditionTypes().contains(WeatherConditionType.CLOUDS_FEW)); assertEquals(1, conditions.get(7).getConditionTypes().size()); assertTrue(conditions.get(7).getConditionTypes().contains(WeatherConditionType.CLOUDS_FEW)); }
List<SimpleWeatherCondition> getOpenWeatherMapConditions() { return this.conditions; }
OpenWeatherMapWeather implements Weather { List<SimpleWeatherCondition> getOpenWeatherMapConditions() { return this.conditions; } }
OpenWeatherMapWeather implements Weather { List<SimpleWeatherCondition> getOpenWeatherMapConditions() { return this.conditions; } OpenWeatherMapWeather(Context context);  OpenWeatherMapWeather(Context context, JSONObject jsonObject); }
OpenWeatherMapWeather implements Weather { List<SimpleWeatherCondition> getOpenWeatherMapConditions() { return 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 { List<SimpleWeatherCondition> getOpenWeatherMapConditions() { return 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();  }