public async Task Handle_QuadraHandler_RetornarQuadrasProximasALocalizacao() { var query = new ObterQuadraPorLocalizacaoQuery { Lat = -23.1087742, Long = -46.5546822 }; var quadrasResult = await _mediator.Send(query); quadrasResult.Should().HaveCount(2); }
public async Task <IReadOnlyList <QuadraModel> > ObterQuadrasPorLocalizacaoAsync(ObterQuadraPorLocalizacaoRequest request) { var obterQuadraPorLocalizacaoQuery = new ObterQuadraPorLocalizacaoQuery { Lat = request.Lat, Long = request.Long }; var quadras = await _mediator .Send(obterQuadraPorLocalizacaoQuery); return(quadras); }
public async Task <IReadOnlyList <QuadraModel> > Handle(ObterQuadraPorLocalizacaoQuery request, CancellationToken cancellationToken) { return(await _quadraServico.ObterQuadrasPorLocalizacaoAsync(request.Lat, request.Long)); }