public void ValidateDrawDirectionShape(BattleShip.Direction shipDirection, bool[,] expectedShape) { RandomMock _random = new RandomMock((int)shipDirection); BattleShip _battleShip = new BattleShip(_random); Assert.Equal(_battleShip.GetShape(), expectedShape); }
public void ValidateEndCoordinates(BattleShip.Direction shipDirection, Coordinate endCoordinate, int boardWidth, int boardHeight) { RandomMock _randomMock = new RandomMock((int)shipDirection); BattleShip _battleShip = new BattleShip(_randomMock); _randomMock = new RandomMock(0); _battleShip.PickRandomPosition(boardWidth, boardHeight, _randomMock); Assert.True(_battleShip.GetEndCoordinates().X == endCoordinate.X && _battleShip.GetEndCoordinates().Y == endCoordinate.Y); }