Exemple #1
0
        public void Success_FindUserByUsername()
        {
            //Arrange
            CustomUser user;
            CustomUser result;

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

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

            result = db_user.FindUserByUsername(user.Username);

            //Assert
            Assert.AreEqual(user.Username, result.Username);
        }
 /// <summary>
 /// finds a user by its username.
 /// </summary>
 /// <param name="username"></param>
 /// <returns>CustomUser</returns>
 public CustomUser FindByUsername(string username)
 {
     return(db_user.FindUserByUsername(username));
 }