コード例 #1
0
        public async Task GetAsync_WithValidZipcode_DoesNotThrow()
        {
            var weatherDL = new WeatherDL(_weatherConfiguration, HttpClient);

            var result = await weatherDL.GetAsync(WhiteHouseZipCode);

            Assert.That(result, Is.Not.Null);
        }
コード例 #2
0
        public void GetAsync_WithInvalidZipcode_ThrowsException()
        {
            var weatherDL = new WeatherDL(_weatherConfiguration, HttpClient);

            Assert.ThrowsAsync <HttpRequestException>(async() => await weatherDL.GetAsync("NotAZipCode"));
        }