Beispiel #1
0
        public void CalcVelocity_Receives_Correct_Tracks()
        {
            _calcVelocity = Substitute.For <ICalcVelocity>();
            Action();
            RaiseFakeEvent();
            RaiseFakeEvent();
            _uut.UpdatesTrack(_Tracklist);

            _calcVelocity.Received().Velocity(_Track1, _Track2);
        }
Beispiel #2
0
        public void Two_Same_Tag_Calculate_Velocity()
        {
            _fakeTransponderData.TrackData.Clear();
            _fakeTransponderData.TrackData.Add(_track1);
            _fakeTransponderData.TrackData.Add(_track2);
            RaiseFakeEvent();

            _monitor.MonitorFlight(receivedTrackData[0]).Returns(true);
            _calcVelocity.Velocity(_track1, _track2).Returns(200);
            RaiseFakeEvent();
            //_monitor.MonitorFlight(receivedTrackData[1]).Returns(true);
            _uut.UpdatesTrack(receivedTrackData);

            Assert.That(receivedTrackData[1].Velocity, Is.EqualTo(200));
        }