public void TreeTraversal_FindNextSiblingOrCousin() { /* * root * / | \ * a b c * /|\ | * / | \ | * aa ab ac ca * /|\ |\ * / | \ | \ * aba abb abc caa cab */ // sibling Assert.AreEqual(a_b_c, TreeTraversal <TestTreePart> .FindNextSiblingOrCousin(a_b_b)); // cousin Assert.AreEqual(a_c, TreeTraversal <TestTreePart> .FindNextSiblingOrCousin(a_b_c)); // cousin through root Assert.AreEqual(b, TreeTraversal <TestTreePart> .FindNextSiblingOrCousin(a_c)); }