Ejemplo n.º 1
0
        public async Task <AppointmentDto> RemoveSectionAsync(AppointmentRemoveSectionDto removeSectionDto)
        {
            RemoveSection.Command command = _mapper.Map <RemoveSection.Command>(removeSectionDto);
            await _mediator.Send(command);

            return(await GetByIdAsync(removeSectionDto.Id));
        }
Ejemplo n.º 2
0
        public void Should_Map()
        {
            // Arrange
            var dto = new AppointmentRemoveSectionDto
            {
                Id        = Guid.NewGuid(),
                SectionId = Guid.NewGuid()
            };

            // Act
            RemoveSection.Command command = _mapper.Map <RemoveSection.Command>(dto);

            // Assert
            command.Should().BeEquivalentTo(dto);
        }