From e89c7f47637c7ddb27e6b6f41c95ff6e1bfe184c Mon Sep 17 00:00:00 2001 From: fdai4616 Date: Wed, 8 Feb 2023 22:17:54 +0100 Subject: [PATCH] Unittest Pong --- src/test_/java/CollisionCheckerTest.java | 12 ++++++++++++ target/classes/classpath.index | Bin 0 -> 236 bytes target/test-classes/BShipTest.class | Bin 0 -> 737 bytes target/test-classes/classpath.index | Bin 0 -> 106 bytes 4 files changed, 12 insertions(+) create mode 100644 target/classes/classpath.index create mode 100644 target/test-classes/BShipTest.class create mode 100644 target/test-classes/classpath.index diff --git a/src/test_/java/CollisionCheckerTest.java b/src/test_/java/CollisionCheckerTest.java index 513c34d..767bda1 100644 --- a/src/test_/java/CollisionCheckerTest.java +++ b/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); + } } diff --git a/target/classes/classpath.index b/target/classes/classpath.index new file mode 100644 index 0000000000000000000000000000000000000000..e5601ba6687866fe5f67169b1375ec07be4b98ca GIT binary patch literal 236 zcmb1OU}0cjU<6_qP-1^jv#RyHMPZbpSdA5L!wg;Cl{2Dqr^Dps_OE*2ciWLW94g@R z1H$N;3Zj4XgUBEc5Xr!>Jq$uKFx;5{V}a=Vg%9i)7|KsGFmxQBd>8PukSvJr!=&MBYBZz~Jt{!0$5m@u)=-cFLe?4g0sNlYZ4F{Xp5~zmJ&>bhFi*Txq zid;F>ZYz#eWONwBEFrygLeoinUtqoF{X1K;-eUpV4j$ssOu$=#%DjNq!L0-fRg#|0 zd!%9-D)%uwRsv;D2da}y`YJk-eV;t5UO13`Pez*WGiT0>G|4J@cMMGuX^5$NyA6`i z=XEl}+z!$LO5XgE1V&F(Psf^gTR{*SIh%Id`~OB*DV5sYFo_20lV*8KcMA4+BdB7B z9sz%h^b8>Im`*NP!Jgf7h|@Iugpk9GPYIoy1U$oYx(U1>e$