|
@ -20,6 +20,18 @@ public class CollisionCheckerTest { |
|
|
// act |
|
|
// act |
|
|
Boolean result = collisionChecker.didTouchTopOrBottomEdge(ballYCoordinate, maxHeight); |
|
|
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 |
|
|
//assert |
|
|
assertTrue(result); |
|
|
assertTrue(result); |
|
|
} |
|
|
} |
|
|