Пример #1
0
        public async void FetchWeatherData_ReturnShouldContainDataFromAPI()
        {
            var data = await WeatherService.FetchWeatherData();

            Assert.NotNull(data?.Temperature);
            Assert.NotNull(data?.Humidity);
        }
Пример #2
0
        private async void btnUpdateData_Click(object sender, RoutedEventArgs e)
        {
            var weatherData = await WeatherService.FetchWeatherData();

            tbxTemperature.Text = weatherData.Temperature.ToString();
            tbxHumidity.Text    = weatherData.Humidity.ToString();
        }
Пример #3
0
        public async void FetchWeatherData_ShouldReturnATemperatureModel()
        {
            var data = await WeatherService.FetchWeatherData();

            Assert.IsType <TemperatureModel>(data);
        }