public void DeleteUser_GoodUser_ReturnsTrue()
        {
            //Arrange
            var username = "******";
            //Act
            var actual = _mProv.DeleteUser(username, true);

            //Assert
            Assert.IsTrue(actual);
        }
        public void CreateUserTest_ValidTestUser_ReturnsSuccess()
        {
            UserParameters         u              = TestUtils.GetValidUser();
            MembershipCreateStatus status         = new MembershipCreateStatus();
            MembershipCreateStatus statusExpected = MembershipCreateStatus.Success;
            MembershipUser         newuser        = _mp.CreateUser(u.username, u.password, u.email, u.passwordQuestion,
                                                                   u.passwordAnswer, u.isApproved, u.providerUserKey, out status);

            //Cleanup
            if (statusExpected == status)
            {
                _mp.DeleteUser(u.username, true);
            }
            Assert.AreEqual(statusExpected, status);
        }
        public static void ClassCleanup()
        {
            //We will remove our sample users
            var mpCleanup = new MemberProv();

            mpCleanup.Initialize("DormouseMembershipProvider", _testConfig);
            foreach (var user in _testUsers)
            {
                mpCleanup.DeleteUser(user.username, true);
            }

            //And our sample role
            var mpRoleCleanup = new RoleProv();

            mpRoleCleanup.Initialize("DormouseMembershipProvider", _testConfig);
            if (mpRoleCleanup.RoleExists("DefaultRole"))
            {
                mpRoleCleanup.DeleteRole("DefaultRole", false);
            }
            foreach (var role in _testRoles)
            {
                if (mpRoleCleanup.RoleExists(role))
                {
                    mpRoleCleanup.DeleteRole(role, false);
                }
            }
        }
        public static void ClassCleanup()
        {
            //We will remove our sample users
            var mpCleanup = new MemberProv();
            mpCleanup.Initialize("DormouseMembershipProvider", _testConfig);
            foreach (var user in _testUsers)
            {
                mpCleanup.DeleteUser(user.username, true);
            }

            //And our sample role
            var mpRoleCleanup = new RoleProv();
            mpRoleCleanup.Initialize("DormouseMembershipProvider", _testConfig);
            if (mpRoleCleanup.RoleExists("DefaultRole"))
            {
                mpRoleCleanup.DeleteRole("DefaultRole", false);
            }
            foreach (var role in _testRoles)
            {
                if (mpRoleCleanup.RoleExists(role))
                {
                    mpRoleCleanup.DeleteRole(role, false);
                }
            }

        }
 public static void ClassCleanup()
 {
     //We will remove our sample users
     var mpCleanup = new MemberProv(new MembershipRepository(), Utilities.GetEncryptedMachineKey());
     mpCleanup.Initialize("DormouseMembershipProvider", _testConfig);
     foreach (var user in _testUsers)
     {
         mpCleanup.DeleteUser(user.username, true);
     }
 }
 public static void ClassCleanup()
 {
     //We will remove our sample users
     var mpCleanup = new MemberProv();
     mpCleanup.Initialize("DormouseMembershipProvider", _testConfig);
     foreach (var user in _testUsers)
     {
         mpCleanup.DeleteUser(user.username, true);
     }
 }
        public static void ClassCleanup()
        {
            //We will remove our sample users
            var mpCleanup = new MemberProv();

            mpCleanup.Initialize("DormouseMembershipProvider", _testConfig);
            foreach (var user in _testUsers)
            {
                mpCleanup.DeleteUser(user.username, true);
            }
        }
        public static void ClassCleanup()
        {
            //We will remove our sample users
            var mpCleanup = new MemberProv(new MembershipRepository(), Utilities.GetEncryptedMachineKey());

            mpCleanup.Initialize("DormouseMembershipProvider", _testConfig);
            foreach (var user in _testUsers)
            {
                mpCleanup.DeleteUser(user.username, true);
            }
        }