Esempio n. 1
0
 @Test
 public void testaaUpdatenvaikutus() {
   testbullet = new Bullet(tilemap, Direction.LEFT);
   testbullet.update();
   testbullet.setMovingVector(Direction.NULL);
   testbullet.update();
   assertTrue(testbullet.shouldBeRemoved());
 }
Esempio n. 2
0
 @Test
 public void testaahasHitSomethingKunPitaisiOsua() {
   testbullet = new Bullet(tilemap, Direction.LEFT);
   testbullet.setPosition(32, 32);
   testbullet.update();
   assertTrue(testbullet.hasHitSomething());
 }
Esempio n. 3
0
 @Test
 public void testaahasHitSomethingKunEiOsuMihinkaan() {
   testbullet = new Bullet(tilemap, Direction.LEFT);
   testbullet.setPosition(200, 200);
   testbullet.update();
   assertFalse(testbullet.hasHitSomething());
 }