public void Union_BadPermission () { DnsPermission dp = new DnsPermission (PermissionState.None); dp.Union (new SecurityPermission (PermissionState.Unrestricted)); }
public void Union () { DnsPermission dpn = new DnsPermission (PermissionState.None); DnsPermission dpu = new DnsPermission (PermissionState.Unrestricted); DnsPermission result = (DnsPermission) dpn.Union (null); Assert.IsFalse (result.IsUnrestricted (), "None U null"); result = (DnsPermission) dpu.Union (null); Assert.IsTrue (result.IsUnrestricted (), "Unrestricted U null"); result = (DnsPermission) dpn.Union (dpn); Assert.IsFalse (result.IsUnrestricted (), "None U None"); result = (DnsPermission) dpu.Union (dpu); Assert.IsTrue (result.IsUnrestricted (), "Unrestricted U Unrestricted"); result = (DnsPermission) dpn.Union (dpu); Assert.IsTrue (result.IsUnrestricted (), "None U Unrestricted"); result = (DnsPermission) dpu.Union (dpn); Assert.IsTrue (result.IsUnrestricted (), "Unrestricted U None"); }