public Process(ICellsBuilder cellsBuilder, IMoveToNextColor moveToNextColor, IProgress progress) { _cellsBuilder = cellsBuilder; _moveToNextColor = moveToNextColor; _progress = progress; }
public ProcessTest() { _cellsBuilder = new CellsBuilder(); _connectedSameCellsFinder = new ConnectedSameCellsFinder(); _changedCellNeighboursFinder = new ChangedCellNeighboursFinder(_connectedSameCellsFinder); _moveToNextColor = new MoveToNextColor(_changedCellNeighboursFinder); var progressMock = new Mock <IProgress>(); _progress = progressMock.Object; _process = new Process(_cellsBuilder, _moveToNextColor, _progress); }
public ConnectedSameCellsTest() { _connectedSameCellsFinder = new ConnectedSameCellsFinder(); _cellsBuilder = new CellsBuilder(); int[,] array = new[, ] { { 0, 1, 2, 2, 3 }, { 3, 3, 4, 4, 4 }, { 3, 2, 1, 2, 6 }, { 3, 1, 2, 1, 4 }, { 3, 1, 2, 1, 4 }, }; _cells = _cellsBuilder.Build(array); }
public ChangedCellNeighboursFinderTest() { _connectedSameCellsFinder = new ConnectedSameCellsFinder(); _changedCellNeighboursFinder = new ChangedCellNeighboursFinder(_connectedSameCellsFinder); _cellsBuilder = new CellsBuilder(); int[,] array = new[, ] { { 0, 1, 2, 2, 3 }, { 3, 3, 4, 4, 4 }, { 3, 2, 1, 2, 6 }, { 3, 1, 2, 1, 4 }, { 3, 1, 2, 1, 4 }, }; _cells = _cellsBuilder.Build(array); _cells.GetCell(0, 0).Changed = true; }