public void When_ValidateUser_is_called_with_a_valid_UserName_and_a_valid_Password_then_true_is_returned()
{
const string decryptedPassword = "******";
var user = UserCreator.CreateSingle();
UserProcess
.Expect(process =>
process.GetUserByLoginName(user.Login.LoginName))
.Return(user)
.Repeat.Once();
UserProcess.Replay();
CryptographyProcess
.Expect(process => process.Decrypt(user.Login.Password))
.Return(decryptedPassword)
.Repeat.Once();
CryptographyProcess.Replay();
var result = CustomMembershipProvider.ValidateUser(user.Login.LoginName, decryptedPassword);
UserProcess.VerifyAllExpectations();
CryptographyProcess.VerifyAllExpectations();
Assert.IsTrue(result);
}