public void SetsState_FlightStateAsExcepted_FilteredCorrect(int x, int y, bool expectedState)
        {
            Track t = new Track()
            {
                XCoordinate = x, YCoordinate = y
            };

            Assert.That(_uut.Filtering(t), Is.EqualTo(expectedState));
        }
        public void CompareTracks_UpdateTracks_Correct()
        {
            List <ITrack> list     = new List <ITrack>();
            string        _flight1 = "TRK042;13000;13000;13000;20180403100622937";

            _mainreceiver.MyReceiver_TransponderDataReady(this, new RawTransponderDataEventArgs(new List <string> {
                _flight1
            }));
            ITrack track1 = parseTracks.CreateFlight(_flight1);

            list.Add(track1);

            filter.Filtering(track1);
            comparetracks.Received().UpdateTracks(Arg.Is <List <ITrack> >(tra => tra[0].Tag.Equals("TRK042")));
        }
Exemple #3
0
        public void MyReceiver_TransponderDataReady(object sender, RawTransponderDataEventArgs e)
        {
            var myList = e.TransponderData;

            filteredTracks = new List <ITrack>();

            foreach (var track in myList)
            {
                ITrack trackObject = parseTracks.CreateFlight(track);
                if (filter.Filtering(trackObject) == true)
                {
                    // Tilføjer filtrerede track-objekter til filtreret-liste
                    filteredTracks.Add(trackObject);
                }
            }

            conflict.UpdateTracks(filteredTracks);
            if (filteredTracks.Count > 1)
            {
                compare.TrackComparison(filteredTracks);
            }
        }
Exemple #4
0
 public void TrackObjectCreated_FilterReturnsTrue_TrackObjectAddedToList()
 {
     _filter.Filtering(Arg.Any <ITrack>()).Returns(true);
     _trackObjectList.Received().Add(Arg.Any <ITrack>());
 }