From 3a8cb37977c7c7031ed39b1dc71a3537d97e8248 Mon Sep 17 00:00:00 2001 From: fdai4581 Date: Wed, 8 Feb 2023 21:21:44 +0100 Subject: [PATCH] update UnitTest Ship --- src/test_/java/ShipTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test_/java/ShipTest.java b/src/test_/java/ShipTest.java index 9eb0a77..cba85fb 100644 --- a/src/test_/java/ShipTest.java +++ b/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 { + @Test + void counter() { + Ship ship = new Ship(3, "TestShip"); + assertFalse(ship.isKilled()); + assertEquals(0, ship.numOfHits); + } } \ No newline at end of file