|
|
@ -1,8 +1,7 @@ |
|
|
|
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; |
|
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
|
|
|
|
class ShipTest { |
|
|
|
@Test |
|
|
@ -19,5 +18,9 @@ class ShipTest { |
|
|
|
ship.counter(); |
|
|
|
assertFalse(ship.isKilled()); |
|
|
|
assertEquals(2, ship.numOfHits); |
|
|
|
|
|
|
|
ship.counter(); |
|
|
|
assertTrue(ship.isKilled()); |
|
|
|
assertEquals(3, ship.numOfHits); |
|
|
|
} |
|
|
|
} |