Exemplo n.º 1
0
        public void insert_before_in_the_middle_with_a_parent()
        {
            a.AppendChild(b);
            a.AppendChild(d);

            d.InsertBefore(c);

            A_should_Have_B_then_C_then_D();
        }
Exemplo n.º 2
0
        public void insert_before_as_the_first_child()
        {
            a.AppendChild(c);
            a.AppendChild(d);

            c.InsertBefore(b);

            A_should_Have_B_then_C_then_D();
        }
Exemplo n.º 3
0
        public void insert_before_with_no_parent()
        {
            b.InsertBefore(c);

            b.PreviousSibling.ShouldBeTheSameAs(c);
            c.NextSibling.ShouldBeTheSameAs(b);

            b.NextSibling.ShouldBeNull();
            c.PreviousSibling.ShouldBeNull();

            b.Parent.ShouldBeNull();
            c.Parent.ShouldBeNull();
        }