public async Task <IActionResult> PostAsync(UserRegisterDto userRegisterDto)
        {
            var userLog = User.FindFirst(ClaimTypes.Name)?.Value;
            var user    = await _userRegister.StoreAsync(null, userRegisterDto.Name, userRegisterDto.Email,
                                                         userRegisterDto.Password, userRegisterDto.Permission, userLog);

            var userDto = Mapper.Map <UserDto>(user);

            return(Ok(userDto));
        }
        public async Task MustInsertANewUserAsync()
        {
            // Given
            var  id           = string.Empty;
            User userNotFound = null;

            // When
            _userMocks.MockUserGetByEmail(userNotFound, _userRegisterDto.Email);
            await _userRegister.StoreAsync(id, _userRegisterDto.Name, _userRegisterDto.Email,
                                           _userRegisterDto.Password, _userRegisterDto.Permission, _userLog);

            // Then
            _userMocks.UserRepository.Verify(r => r.SaveAsync(It.Is <User>(
                                                                  u => u.Name == _userRegisterDto.Name &&
                                                                  u.Id == null)));
        }