public void CreateAndDeleteRoles() { roleProvider = new RoleProvider(); NameValueCollection config = new NameValueCollection(); config.Add("connectionStringName", _connStrName); config.Add("applicationName", _applicationName); roleProvider.Initialize(null, config); // Add the role roleProvider.CreateRole("Administrator"); string[] roles = roleProvider.GetAllRoles(); Assert.AreEqual(1, roles.Length); Assert.AreEqual("administrator", roles[0]); // now delete the role roleProvider.DeleteRole("Administrator", false); roles = roleProvider.GetAllRoles(); Assert.AreEqual(0, roles.Length); }