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");
se = nps.ToXml ();
Assert.IsNull (se.Attribute ("Name"), "Name attribute");
-#if NET_2_0
Assert.AreEqual (0, nps.GetHashCode (), "GetHashCode");
Assert.IsTrue (nps.Equals (nps), "Equals-self");
-#endif
}
[Test]
Assert.IsNull ((se.Attributes ["Description"] as string), "Unrestricted.Description");
Assert.AreEqual ("true", (se.Attributes ["Unrestricted"] as string), "Unrestricted.Unrestricted");
}
-#if NET_2_0
[Test]
public void Equals ()
{
psu.Description = sentinel;
Assert.IsTrue (psu.GetHashCode () == uhc, "GetHashCode-3");
}
-#endif
}
}
-#endif
\ No newline at end of file
+#endif