Example #1
0
        public static GetWeatherFixtureElements ReturnsValidApiResponse(this GetWeatherFixtureElements elements)
        {
            var apiResponse = (ApiResponse <Weather>)elements.Response;

            apiResponse.Payload.Temperature.Value.Should().Be(elements.MappedResponse.Payload.Temperature.Value);
            apiResponse.Payload.Temperature.Format.Should().Be(elements.MappedResponse.Payload.Temperature.Format);
            apiResponse.Payload.Humidity.Should().Be(elements.MappedResponse.Payload.Humidity);
            apiResponse.Payload.Location.City.Should().Be(elements.MappedResponse.Payload.Location.City);
            apiResponse.Payload.Location.Country.Should().Be(elements.MappedResponse.Payload.Location.Country);
            return(elements);
        }
Example #2
0
 public static GetWeatherFixtureElements ValidWeatherQueryWasSendResponseBuilder(
     this GetWeatherFixtureElements elements)
 {
     elements.ResponseBuilder.Received(1).MapWeatherDataResponse(Arg.Is(elements.QueryResult));
     return(elements);
 }
Example #3
0
 public static GetWeatherFixtureElements ValidWeatherQueryWasSendToQueryDispatcher(
     this GetWeatherFixtureElements elements)
 {
     elements.QueryDispatcher.Received(1).ProcessAsync(Arg.Is(elements.Query));
     return(elements);
 }