From 5d83a85cfd906f5511ce7abbbbf865d569e64288 Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Wed, 8 Feb 2023 21:59:29 +0100 Subject: [PATCH] Unittest Pong --- src/test_/java/CollisionCheckerTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test_/java/CollisionCheckerTest.java b/src/test_/java/CollisionCheckerTest.java index 788700b..0f4dfd5 100644 --- a/src/test_/java/CollisionCheckerTest.java +++ b/src/test_/java/CollisionCheckerTest.java @@ -74,4 +74,15 @@ public class CollisionCheckerTest { //assert assertFalse(result); } + @Test + void WhenBallXCoordinateIsLessOrEqualThanZero_didTouchLeftEdge_ReturnsTrue() { + // arrange + Integer ballXCoordinate = -5; + + //act + Boolean result = collisionChecker.didTouchLeftEdge(ballXCoordinate); + + //assert + assertTrue(result); + } }