public void IsAlreadyShownShouldHandleRevealedAndUnrevealedCellsAccordingly() { var testHandler = new IsAlreadyShownHandler(); var testBoard = new Board(new EasyBoardSettings(), new List<IBoardObserver>()); testBoard.Cells[0, 0] = new CellContext(); testBoard.Cells[0, 0].State = CellState.Revealed; testHandler.HandleRequest(row: 0, col: 0, board: testBoard); Assert.AreEqual(expected: true, actual: testBoard.IsAlreadyShown(cellRow: 0, cellCol: 0)); }
public void IsAlreadyShownShouldReturnTrueWhenCalledUponRevealedCell() { var settings = new EasyBoardSettings(); var subscribers = new List<IBoardObserver>() { }; var board = new Board(settings, subscribers); this.FillBoard(board); board.RevealCell(default(int), default(int)); bool result = board.IsAlreadyShown(default(int), default(int)); Assert.AreEqual(!default(bool), result); }