Esempio n. 1
0
 @Test
 public void setPosition3() {
   MovingButton a = new MovingButton(null, "", 1);
   Point p = a.setPosition(1);
   assertTrue(p.x == a.getSize().width && p.y == Game.WINDOW_OFFSET);
   assertTrue(a.getPosition() == 1);
 }
Esempio n. 2
0
 @Test
 public void setPosition4() {
   MovingButton a = new MovingButton(null, "", 1);
   Point p = a.setPosition(4);
   assertTrue(p.x == 0 && p.y == a.getSize().height);
   assertTrue(a.getPosition() == 4);
 }
Esempio n. 3
0
 @Test
 public void setPosition1() {
   MovingButton a = new MovingButton(null, "", 0);
   Point p = a.setPosition(0);
   assertTrue(p.x == 0 && p.y == Game.WINDOW_OFFSET);
   assertTrue(a.getPosition() == 0);
 }