Ejemplo n.º 1
0
 /** Test if the collision between wall and player is handled correctly. */
 @Test
 public void testExpectPlayerCollision() {
   assertFalse(wall.expectPlayerCollision(100, 5, false));
 }
Ejemplo n.º 2
0
 /** Test if the bounced on is handled correctly. */
 @Test
 public void testBouncedOn() {
   wall.bouncedOn();
   assertFalse(wall.isActive());
 }
Ejemplo n.º 3
0
 /** Test if the collision between wall and bubble is handled correctly. */
 @Test
 public void testExpectBubbleCollision() {
   assertTrue(wall.expectBubbleCollision(10, 5, 500));
   assertFalse(wall.expectBubbleCollision(100, 5, 1));
 }
Ejemplo n.º 4
0
 /** Test if the bubbleWall is created correctly. */
 @Test
 public void testBubbleWall() {
   assertEquals(10, wall.getxCoord());
   assertEquals(0, wall.getyCoord());
   assertEquals(Color.RED, wall.getColor());
 }