public async Task <ActionResult <PatientDto> > PutAsync(int id, [FromBody] PatientDto patientDto) { var command = new PutPatient.Command(id, patientDto); var result = await _mediator.Send(command); return(Ok(result)); }
public async Task PutPatient() { // Arrange var command = new PutPatient.Command(new Random().Next(), _patient); var sut = new PutPatient.Handler(_patientService); // Act var response = await sut.Handle(command, new CancellationToken()); // Assert response.Id.Should().Be(99); }