예제 #1
0
        public static GetWheaterForCityFixtureElements ApiGetUrlIsProperlyGeneratedUsingWeatherRequest(
            this GetWheaterForCityFixtureElements elements)
        {
            var parameters = HttpUtility.ParseQueryString(elements.HttpMessageHandler.LastRequest.RequestUri.Query);

            parameters["q"].Should().Be($"{elements.City},{elements.CountryCode}");
            parameters["APPID"].Should().Be(elements.ApiConfiguration.ApiKey);
            parameters["units"].Should().Be(elements.TemperatureScale.ToText());
            return(elements);
        }
예제 #2
0
 public static GetWheaterForCityFixtureElements HttpResponseGoesThroughMapper(
     this GetWheaterForCityFixtureElements elements)
 {
     elements.JsonResponseMapper.Received(1).Map(Arg.Is(elements.HttpMessageHandler.StringResponse));
     return(elements);
 }