public void TestGetParent() { Placemark placemark = null; Assert.That(() => placemark.GetParent <Folder>(), Throws.TypeOf <ArgumentNullException>()); placemark = new Placemark(); Assert.That(placemark.GetParent <Folder>(), Is.Null); var folder = new Folder(); folder.AddFeature(placemark); Assert.That(placemark.GetParent <Folder>(), Is.SameAs(folder)); Assert.That(placemark.GetParent <Kml>(), Is.Null); var kml = new Kml(); kml.Feature = folder; Assert.That(placemark.GetParent <Kml>(), Is.SameAs(kml)); }