public void TestCustomerManagerAuthenticationUserNameException() { //Arrange string email = "*****@*****.**"; Volunteer volunteer = new Volunteer(); //Value you want PasswordHash() to return //Hashing Password string goodPasswordHash = hashPassword("passwordtest"); //Act volunteer = _volunteerAccessor.AuthenticateVolunteer(email, goodPasswordHash); //Assert not needed }
/// <summary> /// Creator : Zach Behrensmeyer /// Created: 4/28/2020 /// Approver: Steven Cardona /// /// This calls the User Authentication Data Accessor Method for customers /// </summary> /// <remarks> /// Updater: NA /// Updated: NA /// Update: NA /// /// </remarks> /// <param name="email"></param> /// <param name="password"></param> /// <returns>Returns Valid User Info</returns> public Volunteer AuthenticateVolunteer(string email, string password) { Volunteer result = null; var passwordHash = hashPassword(password); password = null; try { result = _volunteerAccessor.AuthenticateVolunteer(email, passwordHash); } catch (Exception ex) { throw new ApplicationException("Login failed!", ex); } return(result); }