当前位置: 首页>>代码示例>>C#>>正文


C# UserAccount.VerifyAccount方法代码示例

本文整理汇总了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);
 }
开发者ID:rodmjay,项目名称:BrockAllen.MembershipReboot,代码行数:13,代码来源:UserAccountTests.cs

示例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);
 }
开发者ID:rodmjay,项目名称:BrockAllen.MembershipReboot,代码行数:9,代码来源:UserAccountTests.cs

示例3: KeysMatch_VerificationSucceeds

 public void KeysMatch_VerificationSucceeds()
 {
     var subject = new UserAccount();
     subject.VerificationKey = "test1";
     var result = subject.VerifyAccount("test1");
     Assert.IsTrue(result);
 }
开发者ID:rodmjay,项目名称:BrockAllen.MembershipReboot,代码行数:7,代码来源:UserAccountTests.cs

示例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);
 }
开发者ID:rodmjay,项目名称:BrockAllen.MembershipReboot,代码行数:8,代码来源:UserAccountTests.cs

示例5: AlreadyVerified_VerificationFails

 public void AlreadyVerified_VerificationFails()
 {
     var subject = new UserAccount();
     subject.IsAccountVerified = true;
     var result = subject.VerifyAccount("test");
     Assert.IsFalse(result);
 }
开发者ID:rodmjay,项目名称:BrockAllen.MembershipReboot,代码行数:7,代码来源:UserAccountTests.cs

示例6: EmptyKey_VerificationFails

 public void EmptyKey_VerificationFails()
 {
     var subject = new UserAccount();
     var result = subject.VerifyAccount(null);
     Assert.IsFalse(result);
 }
开发者ID:rodmjay,项目名称:BrockAllen.MembershipReboot,代码行数:6,代码来源:UserAccountTests.cs


注:本文中的UserAccount.VerifyAccount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。