public void Default() { PermissionSetAttribute a = new PermissionSetAttribute(SecurityAction.Assert); Assert.IsNull(a.File, "File"); #if NET_2_0 Assert.IsNull(a.Hex, "Hex"); #endif Assert.IsNull(a.Name, "Name"); Assert.IsNull(a.XML, "XML"); Assert.IsFalse(a.UnicodeEncoded, "UnicodeEncoded"); Assert.AreEqual(a.ToString(), a.TypeId.ToString(), "TypeId"); Assert.IsFalse(a.Unrestricted, "Unrestricted"); IPermission perm = a.CreatePermission(); Assert.IsNull(perm, "CreatePermission"); PermissionSet ps = a.CreatePermissionSet(); Assert.AreEqual(0, ps.Count, "CreatePermissionSet"); }
public static void PermissionSetAttributeCallMethods() { PermissionSetAttribute psa = new PermissionSetAttribute(new Permissions.SecurityAction()); IPermission ip = psa.CreatePermission(); PermissionSet ps = psa.CreatePermissionSet(); }