Browse Source

update UnitTest Ship

main
fdai4581 2 years ago
parent
commit
70ce6239fa
  1. 4
      src/test_/java/ShipTest.java

4
src/test_/java/ShipTest.java

@ -11,5 +11,9 @@ class ShipTest {
Ship ship = new Ship(3, "TestShip"); Ship ship = new Ship(3, "TestShip");
assertFalse(ship.isKilled()); assertFalse(ship.isKilled());
assertEquals(0, ship.numOfHits); assertEquals(0, ship.numOfHits);
ship.counter();
assertFalse(ship.isKilled());
assertEquals(1, ship.numOfHits);
} }
} }
Loading…
Cancel
Save