public void IntersectTest(IRectangle rectangle1, IRectangle rectangle2, IRectangle rectangleExpected) { TraceFile.SetName("IntersectTest"); var result = Service.Intersect(rectangle1, rectangle2); if (rectangleExpected == null) { Assert.IsNull(result); } else { Assert.AreEqual(rectangleExpected.Left(), result.Left(), 0, "Left"); Assert.AreEqual(rectangleExpected.Top(), result.Top(), 0, "Top"); Assert.AreEqual(rectangleExpected.Width(), result.Width(), 0, "Width"); Assert.AreEqual(rectangleExpected.Height(), result.Height(), 0, "Height"); } }