public WeatherForecastModel.Root GetWeatherDetails(string address)
 {
     WeatherForecastModel.Root weatherDetails = new WeatherForecastModel.Root();
     if (address != null)
     {
         var coordinates = _geoCodingBLL.GetCoordinates(address);
         if (coordinates.x != 0 && coordinates.y != 0)
         {
             var forecastUrl = GetWeatherForecast(coordinates.y, coordinates.x);
             weatherDetails = _weatherService.GetWeatherDetails(forecastUrl);
         }
     }
     return(weatherDetails);
 }
Beispiel #2
0
        public void Check_If_Valid_Address_Works()
        {
            var rs = GeoCodingBLL.GetCoordinates(CorrectAddress);

            Assert.IsTrue(rs != null && rs.x != 0 && rs.y != 0);
        }