public void SaltAndHashPassword_Pass() { //Arrange string password = "******"; var user = tu.CreateUserObject(); string resetToken = tu.CreatePasswordResetObject(user).ResetToken; //Act var response = pm.SaltAndHashPassword(resetToken, password); //Assert Assert.IsNotNull(response); Assert.AreNotEqual(response, password); }
public void CreatePasswordReset_Pass() { //Arrange var newUser = tu.CreateUserObject(); newPasswordReset = tu.CreatePasswordResetObject(newUser); var expected = newPasswordReset; //Act using (_db = tu.CreateDataBaseContext()) { var response = rs.CreatePasswordReset(_db, newPasswordReset); _db.SaveChanges(); //Assert Assert.IsNotNull(response); Assert.AreEqual(response.ResetToken, expected.ResetToken); } }