示例#1
0
		public void ConstructorNameReserved ()
		{
			NamedPermissionSet nps = new NamedPermissionSet ("FullTrust");
			Assert.AreEqual ("FullTrust", nps.Name, "Name");
			Assert.IsNull (nps.Description, "Description");
			Assert.IsTrue (nps.IsUnrestricted (), "IsUnrestricted");
			Assert.IsTrue (!nps.IsEmpty (), "IsEmpty");
			Assert.IsTrue (!nps.IsReadOnly, "IsReadOnly");
			Assert.IsTrue (!nps.IsSynchronized, "IsSynchronized");
			Assert.AreEqual (0, nps.Count, "Count");
		}
示例#2
0
		public void ConstructorNamePermissionSetNull ()
		{
			NamedPermissionSet nps = new NamedPermissionSet ("name", null);
			Assert.AreEqual ("name", nps.Name, "Name");
			Assert.IsNull (nps.Description, "Description");
#if NET_2_0
			Assert.IsTrue (!nps.IsUnrestricted (), "IsUnrestricted");
			Assert.IsTrue (nps.IsEmpty (), "IsEmpty");
#else
			Assert.IsTrue (nps.IsUnrestricted (), "IsUnrestricted");
			Assert.IsTrue (!nps.IsEmpty (), "IsEmpty");
#endif
			Assert.IsTrue (!nps.IsReadOnly, "IsReadOnly");
			Assert.IsTrue (!nps.IsSynchronized, "IsSynchronized");
			Assert.AreEqual (0, nps.Count, "Count");
		}