public void Intersect_null () { ConfigurationPermission p1 = new ConfigurationPermission (PermissionState.Unrestricted); IPermission p3 = p1.Intersect (null); Assert.IsNull (p3, "A1"); }
public void Intersect () { ConfigurationPermission p1 = new ConfigurationPermission (PermissionState.Unrestricted); ConfigurationPermission p2 = new ConfigurationPermission (PermissionState.None); IPermission p3 = p1.Intersect (p2); Assert.AreEqual (typeof (ConfigurationPermission), p3.GetType(), "A1"); Assert.IsFalse (((ConfigurationPermission)p3).IsUnrestricted(), "A2"); }
public void Intersect_wrongtype () { ConfigurationPermission p1 = new ConfigurationPermission (PermissionState.Unrestricted); IPermission p3 = p1.Intersect (new StrongNameIdentityPermission (PermissionState.Unrestricted)); }