IsSubsetOf() public method

public IsSubsetOf ( IPermission target ) : bool
target IPermission
return bool
		public void IsSubset_Different ()
		{
			UrlIdentityPermission uip1 = new UrlIdentityPermission (GoodUrls [0]);
			UrlIdentityPermission uip2 = new UrlIdentityPermission (GoodUrls [1]);
			Assert.IsFalse (uip1.IsSubsetOf (uip2), "Mono subset Novell");
			Assert.IsFalse (uip2.IsSubsetOf (uip1), "Novell subset Mono");
		}
		public void IsSubset_None ()
		{
			// IsSubset with none
			// a. source (this) is none -> target is never a subset
			UrlIdentityPermission uip1 = new UrlIdentityPermission (PermissionState.None);
			UrlIdentityPermission uip2 = new UrlIdentityPermission (PermissionState.None);
			foreach (string s in GoodUrls) {
				uip1.Url = s;
				Assert.IsFalse (uip1.IsSubsetOf (uip2), "target " + s);
			}
			uip1 = new UrlIdentityPermission (PermissionState.None);
			// b. destination (target) is none -> target is always a subset
			foreach (string s in GoodUrls) {
				uip2.Url = s;
				Assert.IsFalse (uip2.IsSubsetOf (uip1), "source " + s);
			}
		}
		public void IsSubset_Self ()
		{
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None);
			Assert.IsTrue (uip.IsSubsetOf (uip), "None");
			foreach (string s in GoodUrls) {
				uip.Url = s;
				Assert.IsTrue (uip.IsSubsetOf (uip), s);
			}
		}
		public void IsSubset_Null ()
		{
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None);
			Assert.IsTrue (uip.IsSubsetOf (null), "Empty");
			foreach (string s in GoodUrls) {
				uip.Url = s;
				Assert.IsFalse (uip.IsSubsetOf (null), s);
			}
		}