Browse Source

Unittest Pong

main
fdai4616 2 years ago
parent
commit
e89c7f4763
  1. 12
      src/test_/java/CollisionCheckerTest.java
  2. BIN
      target/classes/classpath.index
  3. BIN
      target/test-classes/BShipTest.class
  4. BIN
      target/test-classes/classpath.index

12
src/test_/java/CollisionCheckerTest.java

@ -109,4 +109,16 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
//assert
assertTrue(result);
}
@Test
void WhenBallXCoordinateIsLessThanMaxWidth_didTouchRightEdge_ReturnsFalse() {
// arrange
Integer ballXCoordinate = 75;
Integer maxWidth = 123;
// act
Boolean result = collisionChecker.didTouchRightEdge(ballXCoordinate, maxWidth);
//assert
assertFalse(result);
}
}

BIN
target/classes/classpath.index

BIN
target/test-classes/BShipTest.class

BIN
target/test-classes/classpath.index

Loading…
Cancel
Save