Browse Source

update UnitTest Ship

main
fdai4581 2 years ago
parent
commit
3a8cb37977
  1. 12
      src/test_/java/ShipTest.java

12
src/test_/java/ShipTest.java

@ -1,3 +1,15 @@
import BattleShip.Ship;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
class ShipTest { class ShipTest {
@Test
void counter() {
Ship ship = new Ship(3, "TestShip");
assertFalse(ship.isKilled());
assertEquals(0, ship.numOfHits);
}
} }
Loading…
Cancel
Save