Пример #1
0
// MS BUG	[ExpectedException (typeof (ArgumentException))]
        public void Unrestricted()
        {
            GacIdentityPermissionAttribute a = new GacIdentityPermissionAttribute(SecurityAction.Assert);

            a.Unrestricted = true;
            IPermission perm = a.CreatePermission();
        }
Пример #2
0
        public void Default()
        {
            GacIdentityPermissionAttribute a = new GacIdentityPermissionAttribute(SecurityAction.Assert);

            Assert.AreEqual(a.ToString(), a.TypeId.ToString(), "TypeId");
            Assert.IsFalse(a.Unrestricted, "Unrestricted");

            IPermission p = a.CreatePermission();

            Assert.IsNotNull(p, "CreatePermission");
            Assert.IsTrue((p is GacIdentityPermission), "GacIdentityPermission");
        }
Пример #3
0
 public static void GacIdentityPermissionAttributeCallMethods()
 {
     GacIdentityPermissionAttribute gipa = new GacIdentityPermissionAttribute(new Permissions.SecurityAction());
     IPermission ip = gipa.CreatePermission();
 }
Пример #4
0
 public static void GacIdentityPermissionAttributeCallMethods()
 {
     GacIdentityPermissionAttribute gipa = new GacIdentityPermissionAttribute(new Permissions.SecurityAction());
     IPermission ip = gipa.CreatePermission();
 }