public void WeatherReaderAsync_Success()
        {
            //arrange
            IWeatherServiceReader accuWeatherServiceReader = new AccuWeatherServiceReader("http://accuweather:60827/Weather/london");

            var httpResponseMessage = new HttpResponseMessage
            {
                Content = new WeatherResultContent(new
                {
                    TemperatureCelsius = 10,
                    WindSpeedKph       = 8
                }),
                StatusCode = HttpStatusCode.OK
            };

            var testHttpMessageHandler = new WeatherTestHttpMessageHandler
                                             (request =>
            {
                Assert.AreEqual("http://accuweather:60827/Weather/london", request.RequestUri.ToString());
                Assert.AreEqual(HttpMethod.Get, request.Method);
            }, httpResponseMessage);

            HttpClient httpClient = new HttpClient(testHttpMessageHandler);

            // act
            WeatherResultInCelsiusAndKph weatherResult = null;

            Task.Run(async() =>
            {
                weatherResult = await accuWeatherServiceReader.WeatherReaderAsync(httpClient);
            }).Wait();

            // assert
            Assert.IsTrue(weatherResult.Temperature == 10 && weatherResult.WindSpeed == 8);
        }
        public void WeatherReaderAsync_Fails()
        {
            //arrange
            IWeatherServiceReader accuWeatherServiceReader = new AccuWeatherServiceReader("http://accuweather:60827/Weather/london");

            var httpResponseMessage = new HttpResponseMessage
            {
                StatusCode = HttpStatusCode.NotFound
            };

            // assert
            var testHttpMessageHandler = new WeatherTestHttpMessageHandler
                                             (request =>
            {
                Assert.AreEqual("http://accuweather:60827/Weather/london", request.RequestUri.ToString());
                Assert.AreEqual(HttpMethod.Get, request.Method);
            }, httpResponseMessage);

            HttpClient httpClient = new HttpClient(testHttpMessageHandler);


            //act and assert
            Assert.That(async() =>
            {
                await accuWeatherServiceReader.WeatherReaderAsync(httpClient);
            }, Throws.TypeOf <HttpRequestException>());
        }