public void TestFlagVisitorIsChangingState() { Cell cell = new MineCell(new Position(1, 1)); IVisitor visitor = new FlagVisitor(); visitor.Visit(cell); Assert.AreEqual(cell.Type, CellTypes.Flag); }
public void TestFlagVisitorIsKeepingStateWhenCellIsRevealled() { Cell cell = new MineCell(new Position(1, 1)); IVisitor visitor = new FlagVisitor(); cell.IsCellRevealed = true; cell.Accept(visitor); Assert.AreNotEqual(cell.Type, CellTypes.Safe); }