public async Task <ActionResult <List <PatientDto> > > GetAllAsync() { var query = new GetAllPatient.Query(); var result = await _mediator.Send(query); return(Ok(result.PatientsDto)); }
public async Task GetAllPatient() { // Arrange var query = new GetAllPatient.Query(); var handler = new GetAllPatient.Handler(_patientService); // Act var response = await handler.Handle(query, new CancellationToken()); // Assert response.PatientsDto.Should().HaveCount(1); }