public void find_next_going_up_two_levels_to_do_so() { a.AppendChild(b); b.AppendChild(c); a.InsertAfter(d); c.FindNext().ShouldEqual(d); }
public void find_index_walks_up_top() { a.AppendChild(b); b.AppendChild(c); c.AppendChild(d); d.AppendChild(e); e.FindIndex().ShouldEqual(a); d.FindIndex().ShouldEqual(a); c.FindIndex().ShouldEqual(a); b.FindIndex().ShouldEqual(a); a.FindIndex().ShouldBeNull(); }
public void append_one_child() { a.AppendChild(b); a.FirstChild.ShouldBeTheSameAs(b); a.LastChild.ShouldBeTheSameAs(b); a.ChildNodes.ShouldHaveTheSameElementsAs(b); b.Parent.ShouldBeTheSameAs(a); b.NextSibling.ShouldBeNull(); b.PreviousSibling.ShouldBeNull(); }