public void LayoutSubviews_WithoutGridLines_PositionsViewVerticallyBasedOnRowHeight()
        {
            var grid = new GridContentView() { CellSize = new SizeF(50, 60) };
            var cell = new UIView();
            grid[new Point(0, 1)] = cell;

            grid.LayoutSubviews();

            Assert.AreEqual(60, cell.Frame.Y);
        }
        public void LayoutSubviews_WithoutGridLines_PositionsViewHorizontallyBasedOnColumnWidth()
        {
            var grid = new GridContentView() { CellSize = new SizeF(50, 60) };
            var cell = new UIView();
            grid[new Point(1, 0)] = cell;

            grid.LayoutSubviews();

            Assert.AreEqual(50, cell.Frame.X);
        }
        public void LayoutSubviews_ResizesViewToRowHeight()
        {
            var grid = new GridContentView() { CellSize = new SizeF(50, 60) };
            var cell = new UIView(new RectangleF(0, 0, 150, 100));
            grid[new Point(0, 0)] = cell;

            grid.LayoutSubviews();

            Assert.AreEqual(60, cell.Frame.Height);
        }
        public void LayoutSubviews_ResizesSubviewToColumnWidth()
        {
            var grid = new GridContentView() { CellSize = new SizeF(50, 60) };
            var cell = new UIView(new RectangleF(0, 0, 100, 150));
            grid[new Point(0, 0)] = cell;

            grid.LayoutSubviews();

            Assert.AreEqual(50, cell.Frame.Width);
        }
        public void LayoutSubviews_WithGridLines_PositionsViewVerticallyBasedOnRowHeightAndGridLines()
        {
            var grid = new GridContentView() { CellSize = new SizeF(50, 60) };
            grid.HorizontalGridlines.Thickness = 2;
            var cell = new UIView();
            grid[new Point(0, 1)] = cell;

            grid.LayoutSubviews();

            Assert.AreEqual(62, cell.Frame.Y);
        }