public void GetWeatherHistoricalForecastTest()
 {
     List<Location> currentLocations = new List<Location>();
     string locationName = "Berlin";
     Location location = new Location() { City = locationName };
     List<WeatherForecast> weatherForecast = worldWeatherOnlineService.GetWeatherHistoricalForecast(worldWeatherOnlineService, xmlService, weatherDocument, location);
     Assert.NotNull(weatherForecast);
     //Assert.True(weatherForecast.Weathers.Count > 0);
     //Assert.NotNull(weatherForecast.Weathers[0].WeatherForecast);
     //Assert.NotNull(weatherForecast.Location);
 }
Exemple #2
0
 private Location CreateOrGetLocation(List<Location> currentLocations, XElement xmlLocation)
 {
     Location foundLocation = FindLocation(currentLocations, xmlLocation);
     if (foundLocation == null)
     {
         foundLocation = new Location()
         {
             Country = xmlLocation.Element("country").Value,
             City = xmlLocation.Element("name").Value,
             Latitude = xmlLocation.Element("location").Attribute("latitude").Value,
             Longitude = xmlLocation.Element("location").Attribute("longitude").Value
         };
     }
     return foundLocation;
 }