Beispiel #1
0
        public void Success_FindUserByEmail()
        {
            //Arrange
            CustomUser user;
            CustomUser result;

            //Act
            user = new CustomUser
            {
                Username = "******",
                Password = "******",
                Email    = "ClassLibrary1 - Test user database - FindUserByEmail",
                IsActive = true,
                Wallet   = 500,
                LoggedIn = true
            };

            db_user.CreateUser(user);
            usernames.Add(user.Username);

            result = db_user.FindUserByEmail(user.Email);

            //Assert
            Assert.AreEqual(user.Email, result.Email);
        }
 /// <summary>
 /// finds a list of users by their email.
 /// </summary>
 /// <param name="email"></param>
 /// <returns>CustomUser</returns>
 public CustomUser FindByEmail(string email)
 {
     return(db_user.FindUserByEmail(email));
 }