Esempio n. 1
0
 /**
  * Verifies that the {@code timerEvent}'s state is {@code expectedState} and that this is not the
  * first lap for the timer.
  *
  * @param timerEvent the {@link TimerEvent} to verify
  * @param expectedState the expected {@link State}
  */
 private void VerifyStateNotFirstLap(TimerEvent timerEvent, State expectedState)
 {
     Assert.AreEqual(expectedState, timerEvent.GetState());
     Assert.IsTrue(timerEvent.GetDuration().CompareTo(Duration.Zero) > 0);
     Assert.IsTrue(timerEvent.GetElapsed().CompareTo(timerEvent.GetDuration()) > 0);
 }
Esempio n. 2
0
 /**
  * Verifies that the {@code timerEvent}'s state is {@link State#START}.
  *
  * @param timerEvent the {@link TimerEvent} to verify
  */
 private void VerifyStartState(TimerEvent timerEvent)
 {
     Assert.AreEqual(State.START, timerEvent.GetState());
     Assert.AreEqual(Duration.Zero, timerEvent.GetDuration());
     Assert.AreEqual(Duration.Zero, timerEvent.GetElapsed());
 }
Esempio n. 3
0
 /**
  * Verifies that the {@code timerEvent}'s state is {@code expectedState} and that this is the
  * first lap for the timer.
  *
  * @param timerEvent the {@link TimerEvent} to verify
  * @param expectedState the expected {@link State}
  */
 private void VerifyStateFirstLap(TimerEvent timerEvent, State expectedState)
 {
     Assert.AreEqual(expectedState, timerEvent.GetState());
     Assert.IsTrue(timerEvent.GetDuration() > Duration.Zero, timerEvent.GetDuration().ToString());
     Assert.AreEqual(timerEvent.GetElapsed(), timerEvent.GetDuration());
 }