@Test public void testPlaceShip() throws ShipTooCloseException { Coordinate[] shipCoordinates = new Coordinate[] {new Coordinate(1, 1)}; battlefield.placeShip(shipCoordinates); assertArrayEquals(new Boolean[] {true}, battlefield.getShipsByCoordinates(shipCoordinates)); }
@Test public void testInitiallyNoShips() { assertArrayEquals( new Boolean[] {false, false, false, false}, battlefield.getShipsByCoordinates(coordinates)); }