@Test public void projectileMovementTest() { // simple movement tests // x direction test Mob testMob = new Mob(testRound, 300, 300, 5, Assets.badGuyNormal, 100); Projectile testProjectile = new Projectile( testRound, testMob.getX() + 100, testMob.getY() + 100, testMob.getX() + 100, testMob.getY() + 100, 10, 10, testMob); int[] expectedCoord = new int[] {400, 400}; int[] actualCoord = new int[] {(int) testProjectile.getX(), (int) testProjectile.getY()}; assertArrayEquals(expectedCoord, actualCoord); testProjectile.update(1); expectedCoord = new int[] {410, 400}; actualCoord = new int[] {(int) testProjectile.getX(), (int) testProjectile.getY()}; assertArrayEquals(expectedCoord, actualCoord); // y direction test testProjectile = new Projectile( testRound, testMob.getX(), testMob.getY(), testMob.getX(), testMob.getY() + 100, 10, 10, testMob); testProjectile.update(1); expectedCoord = new int[] {300, 310}; actualCoord = new int[] {(int) testProjectile.getX(), (int) testProjectile.getY()}; assertArrayEquals(expectedCoord, actualCoord); }