public async Task <AppointmentDto> AddSectionAsync(AppointmentAddSectionDto addSectionDto) { AddSection.Command command = _mapper.Map <AddSection.Command>(addSectionDto); await _mediator.Send(command); return(await GetByIdAsync(addSectionDto.Id)); }
public void Should_Map() { // Arrange var dto = new AppointmentAddSectionDto { Id = Guid.NewGuid(), SectionId = Guid.NewGuid() }; // Act AddSection.Command command = _mapper.Map <AddSection.Command>(dto); // Assert command.Should().BeEquivalentTo(dto); }