public void GetRow_Test() { var expected = new CellState[] { _instance.CellsMatrix[1, 0], _instance.CellsMatrix[1, 1], _instance.CellsMatrix[1, 2], }; var result = _instance.GetRow(1); CollectionAssert.AreEquivalent( expected, result ); }
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 IEnumerable <CellState> Select(GridState grid) { return(grid.GetRow(RowIndex)); }