public IActionResult Get(string cityLocation) { var reporter = new OpenWeatherReporter(); var weatherReport = reporter.GetWeather(cityLocation); return(new ObjectResult(weatherReport.Temperatures)); }
public void WeatherReportTemperatureInExpectedRange() { string city = "Chicago,IL"; var reporter = new OpenWeatherReporter(); var weatherReport = reporter.GetWeather(city); double currentTemperature = weatherReport.Temperatures.Current; Assert.InRange(currentTemperature, -24, 102); }