public void UpdateUser()
        {
            var userDetails = MockObject.NewUserDetails;
            var userId      = _userCommandService.UpdateUser(userDetails);

            userId.Should().NotBeEmpty();
            userId.Should().Be(_user.Id);
            userDetails.FirstName.Should().Be(_user.FirstName);
            userDetails.LastName.Should().Be(_user.LastName);
            userDetails.EmailAddress.Should().Be(_user.EmailAddress);
            userDetails.DateBorn.Should().Be(_user.DateBorn);
            _administrationUnitOfWork.Verify(mock => mock.Commit(It.IsAny <ConcurrencyMode>()), Times.Once);
        }
Beispiel #2
0
 public void UpdateUser([FromBody] UserUpdateModel userUpdateModel)
 {
     _userCommandService.UpdateUser(_mapper.Map <SysUser>(userUpdateModel));
 }
 public void UpdateUser([FromBody] SysUser user)
 {
     _userCommandService.UpdateUser(user);
 }