From 70ce6239fa907b9bd68ddcf671727d94aae85e2b Mon Sep 17 00:00:00 2001 From: fdai4581 Date: Wed, 8 Feb 2023 21:22:38 +0100 Subject: [PATCH] update UnitTest Ship --- src/test_/java/ShipTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test_/java/ShipTest.java b/src/test_/java/ShipTest.java index cba85fb..c2d5a7d 100644 --- a/src/test_/java/ShipTest.java +++ b/src/test_/java/ShipTest.java @@ -11,5 +11,9 @@ class ShipTest { Ship ship = new Ship(3, "TestShip"); assertFalse(ship.isKilled()); assertEquals(0, ship.numOfHits); + + ship.counter(); + assertFalse(ship.isKilled()); + assertEquals(1, ship.numOfHits); } } \ No newline at end of file