From 6956102db875f512c54dd589c71311bbdf79f924 Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Wed, 8 Feb 2023 21:55:19 +0100 Subject: [PATCH] Unittest Pong --- src/test_/java/CollisionCheckerTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test_/java/CollisionCheckerTest.java b/src/test_/java/CollisionCheckerTest.java index f262ff7..7e3e1c8 100644 --- a/src/test_/java/CollisionCheckerTest.java +++ b/src/test_/java/CollisionCheckerTest.java @@ -20,6 +20,18 @@ public class CollisionCheckerTest { // act Boolean result = collisionChecker.didTouchTopOrBottomEdge(ballYCoordinate, maxHeight); + //assert + assertTrue(result); + } + @Test + void WhenBallYCoordinateIsMoreOrEqualToMaxHeight_didTouchTopOrBottomEdge_ReturnsTrue() { + // arrange + Integer ballYCoordinate = 124; + Integer maxHeight = 123; + + // act + Boolean result = collisionChecker.didTouchTopOrBottomEdge(ballYCoordinate, maxHeight); + //assert assertTrue(result); }