void TestHitTest(Point pt, AutomationWrapper parent, AutomationWrapper expected) { AutomationWrapper obj = parent.HitTest(pt.X, pt.Y); if (obj.Name != expected.Name) { throw new ApplicationException( string.Format("Found node '{0}' at {1},{2} instead of node '{3}'", obj.Name, pt.X.ToString(), pt.Y.ToString(), expected.Name) ); } }