예제 #1
0
		public void PermissionStateUnrestricted ()
		{
			// In 2.0 Unrestricted are permitted for identity permissions
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.Unrestricted);
			Assert.AreEqual (String.Empty, uip.Url, "Url");
			SecurityElement se = uip.ToXml ();
			// only class and version are present
			Assert.AreEqual (3, se.Attributes.Count, "Xml-Attributes");
			Assert.IsNull (se.Children, "Xml-Children");
			// and they aren't equals to None
			Assert.IsFalse (uip.Equals (new UrlIdentityPermission (PermissionState.None)));
		}