示例#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);
 }
示例#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);
 }
示例#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);
 }