public void ValidateMap_SetsProperMapMapSizeAndShipList_ReturnsTrue(int id) { ShipsMap shipsMap = new ShipsMap(maps[id], mapSizes[id], shipsLists[id]); bool result = shipsMap.ValidateMap(); Assert.True(result); }
public void ValidateMap_SetsProperMapAndShipListAndWrongMapSize_ReturnsFalse( [Values(0, 1, 2, 3)] int id, [Values(-5, 1, 0, 20)] short mapSize) { ShipsMap shipsMap = new ShipsMap(maps[id], mapSize, shipsLists[id]); bool result = shipsMap.ValidateMap(); Assert.False(result); }
public void Shoot_SetsCoordinatesOnShip_ReturnHitString(int id, int x, int y) { ShipsMap shipsMap = new ShipsMap(maps[id], mapSizes[id], shipsLists[id]); shipsMap.ValidateMap(); string result = shipsMap.Shoot(x, y); Assert.AreEqual("hit", result); }
public void ValidateMap_SetsProperMapAndMapSizeAndWrongShipList_ReturnsFalse(int id) { short[] wrongShipList = { 3, 3, 3, 3 }; ShipsMap shipsMap = new ShipsMap(maps[id], mapSizes[id], wrongShipList); bool result = shipsMap.ValidateMap(); Assert.False(result); }