public void Success_FindUserByPassword() { //Arrange CustomUser user; List <CustomUser> result; //Act user = new CustomUser { Username = "******", Password = "******", Email = "ClassLibrary1 - Test user database - FindUserByPassword", IsActive = true, Wallet = 500, LoggedIn = true }; db_user.CreateUser(user); usernames.Add(user.Username); result = db_user.FindUserByPassword(user.Password); //Assert Assert.AreEqual(user.Password, result[0].Password); }
/// <summary> /// finds a list of users by their password. /// </summary> /// <param name="password"></param> /// <returns>List<CustomUser></returns> public List <CustomUser> FindByPassword(string password) { return(db_user.FindUserByPassword(password)); }