示例#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);
        }
示例#2
0
        public async Task <IActionResult> Put(RegionModifyDto modifyDto)
        {
            await _regionService.ModifyAsync(modifyDto);

            return(NoContent());
        }