|
|
@ -62,4 +62,16 @@ public class CollisionCheckerTest { |
|
|
|
//assert |
|
|
|
assertTrue(result); |
|
|
|
} |
|
|
|
@Test |
|
|
|
void WhenBallRectangleDoesNotIntersectsWithPaddleRectangle_didTouchPaddle_ReturnsFalse() { |
|
|
|
// arrange |
|
|
|
Rectangle ballRectangle = new Rectangle(1,1,1,1); |
|
|
|
Rectangle paddleRectangle = new Rectangle(15,15,1,1); |
|
|
|
|
|
|
|
//act |
|
|
|
Boolean result = collisionChecker.didTouchPaddle(ballRectangle, paddleRectangle); |
|
|
|
|
|
|
|
//assert |
|
|
|
assertFalse(result); |
|
|
|
} |
|
|
|
} |