Reputation: 908
I'm trying to write a unit test for creating a new user . When i fill up the desired fields it gives me error "the password retrieval answer provided is invalid"
Here is my Form
Here is my code
public MembershipCreateStatus CreateUser(string userName, string password, string email)
{
MembershipCreateStatus status;
_provider.CreateUser(userName, password, email, string.Empty, string.Empty, true, string.Empty, out status);
return status;
}
public bool ChangePassword(string userName, string oldPassword, string newPassword)
{
MembershipUser currentUser = _provider.GetUser(userName, true /* userIsOnline */);
return currentUser.ChangePassword(oldPassword, newPassword);
}
}
Upvotes: 1
Views: 207