public async Task <AppointmentDto> RemoveProjectAsync(AppointmentRemoveProjectDto removeProjectDto) { RemoveProject.Command command = _mapper.Map <RemoveProject.Command>(removeProjectDto); await _mediator.Send(command); return(await GetByIdAsync(removeProjectDto.Id)); }
public void Should_Map() { // Arrange var dto = new AppointmentRemoveProjectDto { Id = Guid.NewGuid(), ProjectId = Guid.NewGuid() }; // Act RemoveProject.Command command = _mapper.Map <RemoveProject.Command>(dto); // Assert command.Should().BeEquivalentTo(dto); }