Exemplo n.º 1
0
        public void Should_Map()
        {
            // Arrange
            var regionDto = new RegionModifyDto {
                Id = Guid.NewGuid(), Body = new RegionModifyBodyDto {
                    Name = "Name"
                }
            };
            var expectedCommand = new Modify.Command {
                Id = regionDto.Id, Name = regionDto.Body.Name
            };

            // Act
            Modify.Command command = _mapper.Map <Modify.Command>(regionDto);

            // Assert
            command.Should().BeEquivalentTo(expectedCommand);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Put(RegionModifyDto modifyDto)
        {
            await _regionService.ModifyAsync(modifyDto);

            return(NoContent());
        }