public void CustomComplexRectangles() { Assert.AreEqual(26, TotalAreaCoveredByRectangles.Calculate(new[] { new[] { 0, 0, 5, 5 }, new[] { 1, 1, 4, 4 }, new[] { 2, 2, 3, 6 } })); }
public void ThreeRectangles() { Assert.AreEqual(36, TotalAreaCoveredByRectangles.Calculate(new[] { new[] { 3, 3, 8, 5 }, new[] { 6, 3, 8, 9 }, new[] { 11, 6, 14, 12 } })); }
public void TwoRectanglesV2() { Assert.AreEqual(4, TotalAreaCoveredByRectangles.Calculate(new[] { new[] { 0, 0, 1, 1 }, new[] { 0, 0, 2, 2 } })); }
public void OneRectangleV2() { Assert.AreEqual(22, TotalAreaCoveredByRectangles.Calculate(new[] { new[] { 0, 4, 11, 6 } })); }
public void OneRectangle() { Assert.AreEqual(1, TotalAreaCoveredByRectangles.Calculate(new[] { new[] { 0, 0, 1, 1 } })); }
public void ZeroRectangles() { Assert.AreEqual(0, TotalAreaCoveredByRectangles.Calculate(Enumerable.Empty <int[]>())); }