Browse Source

Unittest Pong

main
fdai4616 2 years ago
parent
commit
5d83a85cfd
  1. 11
      src/test_/java/CollisionCheckerTest.java

11
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);
}
}
Loading…
Cancel
Save