Ejemplo n.º 1
0
        public UserEntity GetUserByEmailToken(string email)
        {
            var user = _userQueryProcessor.GetByEmail(email);

            user.UserToken = Guid.NewGuid().ToString();
            return(user);
        }
        public void GetByEmailShouldReturnValidUser()
        {
            // arrange
            var user = new UserEntity {
                Id = Guid.NewGuid(), Email = "*****@*****.**"
            };

            _userList.Add(user);
            _userList.Add(new UserEntity {
                Id = Guid.NewGuid(), Email = "*****@*****.**"
            });
            _userList.Add(new UserEntity {
                Id = Guid.NewGuid(), Email = "*****@*****.**"
            });

            // act
            var result = _userQueryProcessor.GetByEmail("*****@*****.**");

            // assert
            result.Id.Should().Be(user.Id);
        }