public IActionResult Get(string cityLocation)
        {
            var reporter      = new OpenWeatherReporter();
            var weatherReport = reporter.GetWeather(cityLocation);

            return(new ObjectResult(weatherReport.Temperatures));
        }
예제 #2
0
        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);
        }