public void RecalculationCompletingCellTest() { var rn = new RandomFieldAlgorithm(new Field()); rn.ListShips.Clear(); var ship = new Ship(new Location(0, 0), Orientation.Horizontal, 1, new Field()); var ship1 = new Ship(new Location(0, 0), Orientation.Horizontal, 1, new Field()); var ship2 = new Ship(new Location(0, 0), Orientation.Horizontal, 1, new Field()); rn.AddShips(ship); rn.AddShips(ship1); rn.AddShips(ship2); rn.RecalculationCompletingCell(ship); Assert.AreEqual(2, rn.ListShips.Count); }
public void AddShipsTest() { var rn = new RandomFieldAlgorithm(new Field()); rn.ListShips.Clear(); var ship = new Ship(new Location(0, 0), Orientation.Horizontal, 1, new Field()); rn.AddShips(ship); Assert.AreEqual(1, rn.ListShips.Count); }