public void Delete() { KmlItem item = new KmlItem("test"); Assert.IsFalse(item.Delete()); item.CanBeDeleted = false; Assert.IsFalse(item.Delete()); KmlNode root = new KmlNode("root"); root.Add(item); Assert.AreEqual(root, item.Parent); Assert.IsFalse(item.Delete()); item.CanBeDeleted = true; Assert.IsTrue(item.Delete()); }