/** testing for method passengerClearedCustoms */ @Test public void testPassengerClearedCustoms() { Simulator s = new Simulator(numCustomsDesks, numPassengers); assertFalse(s.passengerClearedCustoms()); s.step(); assertFalse(s.passengerClearedCustoms()); s.step(); assertTrue(s.passengerClearedCustoms()); }
/** testing for method moreSteps */ @Test public void testMoreSteps() { Simulator s = new Simulator(numCustomsDesks, numPassengers); assertTrue(s.moreSteps()); s.step(); assertTrue(s.moreSteps()); s.step(); assertFalse(s.moreSteps()); }
/** 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); }
/** testing for method getStepsTaken */ @Test public void testGetStepsTaken() { Simulator s = new Simulator(numCustomsDesks, numPassengers); assertEquals(0, s.getStepsTaken()); s.step(); assertEquals(1, s.getStepsTaken()); }