示例#1
0
  @Test
  public void testFirstChange() {

    Assert.assertTrue(dir.getX() == 0 && dir.getY() == 0);
    dir.changeDirection();
    Assert.assertFalse(dir.getX() == 0 && dir.getY() == 0);
  }
示例#2
0
  @Test
  public void testCouldntBackToZeroZero() {

    for (int i = 0; i < 50; i++) {
      dir.changeDirection();
      Assert.assertFalse(dir.getX() == 0 && dir.getY() == 0);
    }
  }