示例#1
0
        public void OnTimer_ForStart_WithoutWaitingRider_ShouldIgnoreEvent()
        {
            //0 is the start gate
            timer.EmitTriggerEvent(100, "Timer", 0, new DateTime(2000, 1, 1, 1, 1, 1));

            source.Cancel();

            RaceSummary summary = race.Result;
            var         state   = subject.GetState;

            Assert.AreEqual(0, summary.Events.Count);
            Assert.AreEqual(0, state.onTrack.Count);
            Assert.AreEqual(0, state.waiting.Count);
        }
示例#2
0
 /// <summary>
 /// Makes events for a lap finish at start + 1 minute
 /// </summary>
 /// <param name="riderName"></param>
 /// <param name="sensorId"></param>
 /// <param name="end"></param>
 /// <param name="id"></param>
 /// <param name="time"></param>
 private void MakeEndEvents(Rider rider, DateTime end, MockRiderIdUnit id, MockTimingUnit time)
 {
     id.EmitIdEvent(rider, end);
     time.EmitTriggerEvent(100, "Timer", 1, end);
     id.EmitExitEvent(rider, end);
 }
示例#3
0
 /// <summary>
 /// Makes events for a lap finish at start + 1 minute
 /// </summary>
 /// <param name="riderName"></param>
 /// <param name="sensorId"></param>
 /// <param name="end"></param>
 /// <param name="id"></param>
 /// <param name="time"></param>
 private void MakeEndEvents(Rider rider, DateTime end, long microseconds, MockRiderIdUnit id, MockTimingUnit time)
 {
     id.EmitIdEvent(rider, end);
     time.EmitTriggerEvent(microseconds, "Timer", 1, end);
 }
示例#4
0
 /// <summary>
 /// Makes events for a lap begin at start
 /// </summary>
 /// <param name="riderName"></param>
 /// <param name="sensorId"></param>
 /// <param name="start"></param>
 /// <param name="id"></param>
 /// <param name="time"></param>
 private void MakeStartEvents(Rider rider, DateTime start, MockRiderIdUnit id, MockTimingUnit time)
 {
     id.EmitIdEvent(rider, start);
     time.EmitTriggerEvent(100, "Timer", 0, start);
     id.EmitExitEvent(rider, start);
 }
示例#5
0
 /// <summary>
 /// Makes events for a lap begin at start
 /// </summary>
 /// <param name="riderName"></param>
 /// <param name="sensorId"></param>
 /// <param name="start"></param>
 /// <param name="id"></param>
 /// <param name="time"></param>
 private void MakeStartEvents(Rider rider, DateTime start, long microseconds, MockRiderIdUnit id, MockTimingUnit time)
 {
     id.EmitIdEvent(rider, start);
     time.EmitTriggerEvent(microseconds, "Timer", 0, start);
 }