Ejemplo n.º 1
0
        public void GetRoleUsers()
        {
            byte[] password = ASCIIEncoding.ASCII.GetBytes("password");

            manager.CreateRole(roleName);
            manager.CreateUser("user1", password);
            manager.CreateUser("user2", password);
            manager.CreateUserRole("user1", roleName);
            manager.CreateUserRole("user2", roleName);

            DataSet ds = manager.GetRoleUsers(roleName);

            Assert.AreEqual(2, ds.Tables[0].Rows.Count);

            manager.DeleteUserRole("user1", roleName);
            manager.DeleteUserRole("user2", roleName);
            manager.DeleteUser("user1");
            manager.DeleteUser("user2");
            manager.DeleteRole(roleName);
        }
Ejemplo n.º 2
0
 private void GetRoleUsersDelegate(params object[] methodParams)
 {
     manager.GetRoleUsers((string)methodParams[0]);
 }