// MS BUG [ExpectedException (typeof (ArgumentException))] public void Unrestricted() { GacIdentityPermissionAttribute a = new GacIdentityPermissionAttribute(SecurityAction.Assert); a.Unrestricted = true; IPermission perm = a.CreatePermission(); }
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"); }
public static void GacIdentityPermissionAttributeCallMethods() { GacIdentityPermissionAttribute gipa = new GacIdentityPermissionAttribute(new Permissions.SecurityAction()); IPermission ip = gipa.CreatePermission(); }