public void CellViewSanityTest2() { List<RectanglePoly> r = new List<RectanglePoly>() { }; CellsPageViewer cv = new CellsPageViewer(200, 200); List<Rectangle> result = new List<Rectangle>(cv.ComputeView(r)); Assert.AreEqual(0, result.Count); }
public void CellViewSanityTest1() { RectanglePoly rect = new RectanglePoly(100, 100, 200, 200); List<RectanglePoly> r = new List<RectanglePoly>() { rect }; CellsPageViewer cv = new CellsPageViewer(200, 200); List<Rectangle> result = new List<Rectangle>(cv.ComputeView(r)); Assert.AreEqual(1, result.Count); Assert.AreEqual(rect.BoundingBox, result[0]); }
public void NoOverlapNoMerge() { RectanglePoly rect1 = new RectanglePoly(100, 100, 200, 200); RectanglePoly rect2= new RectanglePoly(200, 100, 250, 200); List<RectanglePoly> r = new List<RectanglePoly>() { rect1, rect2 }; CellsPageViewer cv = new CellsPageViewer(250, 250); List<Rectangle> result = new List<Rectangle>(cv.ComputeView(r)); List<Rectangle> expected = new List<Rectangle>() { rect1, rect2 }; CollectionAssert.AreEqual(result, expected); }