private void SetUp4x4Grid() { Grid = new GridState { CellsMatrix = TableUtils.BuildCellMatrix(4, 4) }; }
public void Select_NullTest() { var grid = new GridState { CellsMatrix = Utils.BuildCellMatrix(3, 3) }; grid.CellsMatrix[1, 2] = null; var area = new CellArea() { RowIndex = 1, ColumnIndex = 2 }; Assert.AreEqual(0, area.Select(grid).Count()); }
public void Select_Test() { var grid = new GridState { CellsMatrix = Utils.BuildCellMatrix(3, 3) }; var area = new RowArea() { RowIndex = 1 }; CollectionAssert.AreEquivalent( grid.GetRow(1), area.Select(grid).ToArray() ); }
public void Select_Test() { var grid = new GridState { CellsMatrix = Utils.BuildCellMatrix(3, 3) }; var area = new CellArea() { RowIndex = 1, ColumnIndex = 2 }; Assert.AreSame( grid.CellsMatrix[1, 2], area.Select(grid).Single() ); }
private void Set3x3TopStartCells() { _instance.CellsMatrix = TableUtils.TriangleTopStart(3, 3); }
private void Set3x3EndBottomCells() { _instance.CellsMatrix = TableUtils.TriangleEndBottom(3, 3); }
private void Set4x3SquareCells() { _instance.CellsMatrix = TableUtils.BuildCellMatrix(4, 4); }
public void Initialize() { _instance = new GridState(); _instance.CellsMatrix = TableUtils.BuildCellMatrix(4, 3); }