Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/01/10 18:57:26 (14 years ago)
Author:
cfleisch
Message:

LockUser/UnlockUser in Membership Provider implemented (#1055)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabMembershipProviderTest.cs

    r3977 r3992  
    237237
    238238    /// <summary>
     239    ///A test for LockUser
     240    ///</summary>
     241    [TestMethod()]
     242    public void LockUserTest()
     243    {
     244        HeuristicLabMembershipProvider target = new HeuristicLabMembershipProvider();
     245        MembershipCreateStatus status;
     246        HeuristicLabUser user = (HeuristicLabUser)target.CreateUser("testname", "newPassword", "testemail", "testquestion", "testanswer", true, null, out status);
     247        user.UnlockUser();
     248        Assert.IsFalse(user.Locked);
     249        user.LockUser();
     250        Assert.IsTrue(user.Locked);
     251        Assert.Inconclusive("Verify the correctness of this test method.");
     252    }
     253
     254    /// <summary>
    239255    ///A test for UnlockUser
    240256    ///</summary>
    241257    [TestMethod()]
    242     public void UnlockUserTest() {
    243       HeuristicLabMembershipProvider target = new HeuristicLabMembershipProvider(); // TODO: Initialize to an appropriate value
    244       string userName = string.Empty; // TODO: Initialize to an appropriate value
    245       bool expected = false; // TODO: Initialize to an appropriate value
    246       bool actual;
    247       actual = target.UnlockUser(userName);
    248       Assert.AreEqual(expected, actual);
    249       Assert.Inconclusive("Verify the correctness of this test method.");
     258    public void UnlockUserTest()
     259    {
     260        HeuristicLabMembershipProvider target = new HeuristicLabMembershipProvider();
     261        MembershipCreateStatus status;
     262        HeuristicLabUser user = (HeuristicLabUser)target.CreateUser("testname", "newPassword", "testemail", "testquestion", "testanswer", true, null, out status);
     263        user.LockUser();
     264        Assert.IsTrue(user.Locked);
     265        user.UnlockUser();
     266        Assert.IsFalse(user.Locked);
     267        Assert.Inconclusive("Verify the correctness of this test method.");
    250268    }
    251269
Note: See TracChangeset for help on using the changeset viewer.