public async Task <int?> GetTemperatureFor(string query)
        {
            WeatherForecastServiceResponse response = await _weatherForecastService.GetWeatherForecastFor(query);

            if (response.current == null)
            {
                return(null);
            }

            return(response.current.temperature);
        }
Пример #2
0
 public void SetUp()
 {
     weatherForecastServiceResponse = new WeatherForecastServiceResponse();
     weatherForecastServiceMocked   = new Mock <IWeatherForecastService>();
     weatherForecastManager         = new WeatherForecastManager(weatherForecastServiceMocked.Object);
 }