public void AreListsIdentical()
        {
            string test = "ATR423;39045;12932;14000;20151006213456789";


            Assert.That(_uut.TransponderParser(test), Is.EqualTo(testList));
        }
Beispiel #2
0
        public void ObjectifierUsesTransponderParsing()
        {
            List <string> expectedStringList = new List <string>()
            {
                "ATR423", "39045", "12932", "14000", "20151006213456789"
            };

            Assert.That(_transponderParsing.TransponderParser(_transponderArgsList[0]), Is.EqualTo(expectedStringList));
        }
Beispiel #3
0
        public void MakeTrack(object sender, RawTransponderDataEventArgs e)
        {
            _trackObjects.Clear();
            foreach (var data in e.TransponderData)                                       //foreach string in the stringlist
            {
                var trackData = _transponderParsing.TransponderParser(data);              //Parse string (contains all track data)

                if (_trackingValidation.IsTrackInMonitoredAirspace(trackData))            //Only if plane is inside the Monitored area
                {
                    var track = new TrackObject(trackData);                               //Make new trackObject
                    track.PrettyTimeStamp = _dateFormatter.FormatTimestamp(trackData[4]); //Add formated date to the Track object

                    _trackObjects.Add(track);                                             //Add the track to the list of Tracks
                }
            }

            if (_trackObjects.Count != 0)   //If there are any trackObjects
            {
                var handler = TrackListReady;
                handler?.Invoke(this, new TrackListEventArgs(_trackObjects));   //Invoke TrackListReady event, containing all the trackObjects
            }
        }