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); }
public async Task <IActionResult> Put(RegionModifyDto modifyDto) { await _regionService.ModifyAsync(modifyDto); return(NoContent()); }