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


C# UserAccount.Init方法代码示例

本文整理汇总了C#中UserAccount.Init方法的典型用法代码示例。如果您正苦于以下问题:C# UserAccount.Init方法的具体用法?C# UserAccount.Init怎么用?C# UserAccount.Init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserAccount的用法示例。


在下文中一共展示了UserAccount.Init方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ExistingID_Throws

 public void ExistingID_Throws()
 {
     var sub = new UserAccount();
     sub.ID = Guid.NewGuid();
     sub.Init("ten", "user", "pass", "email");
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:6,代码来源:UserAccountTests.cs

示例2: EmptyPass_Throws

 public void EmptyPass_Throws()
 {
     var sub = new UserAccount();
     sub.Init("ten", "user", "", "email");
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:5,代码来源:UserAccountTests.cs

示例3: EmptyEmail_Throws

 public void EmptyEmail_Throws()
 {
     var sub = new UserAccount();
     sub.Init("ten", "user", "pass", "");
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:5,代码来源:UserAccountTests.cs

示例4: EmptyTenant_Throws

 public void EmptyTenant_Throws()
 {
     var sub = new UserAccount();
     sub.Init("", "user", "pass", "email");
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:5,代码来源:UserAccountTests.cs

示例5: EmptyUsername_Throws

 public void EmptyUsername_Throws()
 {
     var sub = new UserAccount();
     sub.Init("ten", "", "pass", "email");
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:5,代码来源:UserAccountTests.cs

示例6: NullPass_Throws

 public void NullPass_Throws()
 {
     var sub = new UserAccount();
     sub.Init("ten", "user", null, "email");
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:5,代码来源:UserAccountTests.cs

示例7: NullEmail_Throws

 public void NullEmail_Throws()
 {
     var sub = new UserAccount();
     sub.Init("ten", "user", "pass", null);
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:5,代码来源:UserAccountTests.cs

示例8: NullUsername_Throws

 public void NullUsername_Throws()
 {
     var sub = new UserAccount();
     sub.Init("ten", null, "pass", "email");
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:5,代码来源:UserAccountTests.cs

示例9: NullTenant_Throws

 public void NullTenant_Throws()
 {
     var sub = new UserAccount();
     sub.Init(null, "user", "pass", "email");
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:5,代码来源:UserAccountTests.cs

示例10: IsAccountVerified_SetProperly

 public void IsAccountVerified_SetProperly()
 {
     {
         SecuritySettings.Instance = new SecuritySettings();
         SecuritySettings.Instance.RequireAccountVerification = true;
         var sub = new UserAccount();
         sub.Init("ten", "user", "pass", "email");
         Assert.IsFalse(sub.IsAccountVerified);
     }
     {
         SecuritySettings.Instance = new SecuritySettings();
         SecuritySettings.Instance.RequireAccountVerification = false;
         var sub = new UserAccount();
         sub.Init("ten", "user", "pass", "email");
         Assert.IsTrue(sub.IsAccountVerified);
     }
 }
开发者ID:EdHastings,项目名称:BrockAllen.MembershipReboot,代码行数:17,代码来源:UserAccountTests.cs

示例11: Verification_SetProperly

 public void Verification_SetProperly()
 {
     {
         SecuritySettings.Instance = new SecuritySettings();
         SecuritySettings.Instance.RequireAccountVerification = true;
         var sub = new UserAccount();
         sub.Init("ten", "user", "pass", "email");
         Assert.IsNotNull(sub.VerificationKey);
         Assert.IsNotNull(sub.VerificationKeySent);
     }
     {
         SecuritySettings.Instance = new SecuritySettings();
         SecuritySettings.Instance.RequireAccountVerification = false;
         var sub = new UserAccount();
         sub.Init("ten", "user", "pass", "email");
         Assert.IsNull(sub.VerificationKey);
         Assert.IsNull(sub.VerificationKeySent);
     }
 }
开发者ID:EdHastings,项目名称:BrockAllen.MembershipReboot,代码行数:19,代码来源:UserAccountTests.cs

示例12: IsLoginAllowed_SetProperly

 public void IsLoginAllowed_SetProperly()
 {
     {
         SecuritySettings.Instance = new SecuritySettings();
         SecuritySettings.Instance.AllowLoginAfterAccountCreation = true;
         var sub = new UserAccount();
         sub.Init("ten", "user", "pass", "email");
         Assert.IsTrue(sub.IsLoginAllowed);
     }
     {
         SecuritySettings.Instance = new SecuritySettings();
         SecuritySettings.Instance.AllowLoginAfterAccountCreation = false;
         var sub = new UserAccount();
         sub.Init("ten", "user", "pass", "email");
         Assert.IsFalse(sub.IsLoginAllowed);
     }
 }
开发者ID:EdHastings,项目名称:BrockAllen.MembershipReboot,代码行数:17,代码来源:UserAccountTests.cs


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