예제 #1
0
  /** testing for method getCurrentIndex */
  @Test
  public void testGetCurrentIndex() {
    Simulator s = new Simulator(numCustomsDesks, numPassengers);
    assertEquals(-1, s.getCurrentIndex());

    s.step();

    int a = s.getCurrentIndex();
    assertTrue(a < 3 && a >= 0);

    s.step();
    a = s.getCurrentIndex();
    assertTrue(a >= 0);
  }