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 void RoleExists_GivenGoodRole_ReturnsTrue() { //Arrange //Act var actual = _mProv.RoleExists("ValidRole"); //Assert Assert.IsTrue(actual); }
public void CreateRole_GivenGoodRole_AddsRole() { //Arrange //Act _mpRole.CreateRole("SampleToAdd"); var actual = _mpRole.RoleExists("SampleToAdd"); _mpRole.DeleteRole("SampleToAdd", false); //Assert Assert.IsTrue(actual); }