本文整理汇总了C#中UserAccount.VerifyAccount方法的典型用法代码示例。如果您正苦于以下问题:C# UserAccount.VerifyAccount方法的具体用法?C# UserAccount.VerifyAccount怎么用?C# UserAccount.VerifyAccount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserAccount
的用法示例。
在下文中一共展示了UserAccount.VerifyAccount方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FailedVerification_VerificationFlagsNotChanged
public void FailedVerification_VerificationFlagsNotChanged()
{
var sent = new DateTime(2000, 2, 3);
var subject = new UserAccount();
subject.VerificationKey = "test1";
subject.VerificationKeySent = sent;
subject.VerifyAccount("test2");
Assert.AreEqual(false, subject.IsAccountVerified);
Assert.AreEqual("test1", subject.VerificationKey);
Assert.AreEqual(sent, subject.VerificationKeySent);
}
示例2: SuccessfulVerification_VerificationFlagsReset
public void SuccessfulVerification_VerificationFlagsReset()
{
var subject = new UserAccount();
subject.VerificationKey = "test";
subject.VerifyAccount("test");
Assert.AreEqual(true, subject.IsAccountVerified);
Assert.IsNull(subject.VerificationKey);
Assert.IsNull(subject.VerificationKeySent);
}
示例3: KeysMatch_VerificationSucceeds
public void KeysMatch_VerificationSucceeds()
{
var subject = new UserAccount();
subject.VerificationKey = "test1";
var result = subject.VerifyAccount("test1");
Assert.IsTrue(result);
}
示例4: KeysDontMatch_VerificationFails
public void KeysDontMatch_VerificationFails()
{
var subject = new UserAccount();
subject.IsAccountVerified = true;
subject.VerificationKey = "test1";
var result = subject.VerifyAccount("test2");
Assert.IsFalse(result);
}
示例5: AlreadyVerified_VerificationFails
public void AlreadyVerified_VerificationFails()
{
var subject = new UserAccount();
subject.IsAccountVerified = true;
var result = subject.VerifyAccount("test");
Assert.IsFalse(result);
}
示例6: EmptyKey_VerificationFails
public void EmptyKey_VerificationFails()
{
var subject = new UserAccount();
var result = subject.VerifyAccount(null);
Assert.IsFalse(result);
}