public void TestRectangleTreeAllContents() { for (int i = 0; i < rectangles.Length; i++) { rt.Add(rectangles[i]); } List <Rectangle> contents = rt.GetContents(); Assert.AreEqual(7, contents.Count); foreach (Rectangle rec in rectangles) { Assert.IsTrue(contents.Contains(rec)); } }