public async Task ShouldReturnCurrentWeather() { var query = new GetCurrentWeatherForecastQuery { Id = 2172797, Lat = 1, Lon = 1, Q = "Auckland" }; var result = await SendAsync(query); result.Should().NotBeNull(); result.Succeeded.Should().BeTrue(); result.Data.weather.Count.Should().BeGreaterThan(0); }
public async Task <ActionResult <ServiceResult <CurrentWeatherForecastDto> > > GetCurrentWeather([FromQuery] GetCurrentWeatherForecastQuery query) { return(await Mediator.Send(query)); }