Browse Source

Unittest Pong

main
fdai4616 2 years ago
parent
commit
4e10ef914d
  1. 12
      src/test_/java/CollisionCheckerTest.java

12
src/test_/java/CollisionCheckerTest.java

@ -96,4 +96,16 @@ public class CollisionCheckerTest {
//assert //assert
assertFalse(result); assertFalse(result);
} }
@Test
void WhenBallXCoordinateIsMoreOrEqualToMaxWidth_didTouchRightEdge_ReturnsTrue() {
// arrange
Integer ballXCoordinate = 124;
Integer maxWidth = 123;
// act
Boolean result = collisionChecker.didTouchRightEdge(ballXCoordinate, maxWidth);
//assert
assertTrue(result);
}
} }
Loading…
Cancel
Save