diff --git a/src/test_/java/CollisionCheckerTest.java b/src/test_/java/CollisionCheckerTest.java index 78b955d..f262ff7 100644 --- a/src/test_/java/CollisionCheckerTest.java +++ b/src/test_/java/CollisionCheckerTest.java @@ -1,2 +1,26 @@ +import PingPong.CollisionChecker; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertTrue; + + public class CollisionCheckerTest { + CollisionChecker collisionChecker; + @BeforeEach + public void before() { + CollisionChecker collisionChecker = new CollisionChecker(); + } + @Test + void WhenBallYCoordinateIsLessOrEqualThanZero_didTouchTopOrBottomEdge_ReturnsTrue() { + // arrange + Integer ballYCoordinate = -1; + Integer maxHeight = 123; + + // act + Boolean result = collisionChecker.didTouchTopOrBottomEdge(ballYCoordinate, maxHeight); + + //assert + assertTrue(result); + } }