public IEnumerable <WeatherForecastModel.Period> Get(string SearchTerm) { var forecast = new List <WeatherForecastModel.Period>(); var response = _weatherBLL.GetWeatherDetails(SearchTerm); if (response != null) { if (response.properties != null) { forecast = response.properties.periods; } } return(forecast); }
public void OnPostGetWeatherForecast() { Forecast = new List <WeatherForecastModel.Period>(); var searchString = Request.Form["address"]; this.SearchTerms = searchString; var response = _weatherBLL.GetWeatherDetails(searchString); if (response != null) { if (response.properties != null) { Forecast = response.properties.periods; } } }
//4600 Silver Hill Rd, Suitland, MD 20746 public void OnGet(string SearchTerm) { FirstTime = true; if (string.IsNullOrEmpty(SearchTerm)) { FirstTime = false; } Forecast = new List <WeatherForecastModel.Period>(); var response = _weatherBLL.GetWeatherDetails(SearchTerm); if (response != null) { if (response.properties != null) { Forecast = response.properties.periods; } } }
public void Check_If_Weather_Details_Works_With_Correct_Address() { var rs = WeatherBLL.GetWeatherDetails(CorrectAddress); Assert.IsTrue(rs != null); }