Beispiel #1
0
        public void SetUp()
        {
            _writer                  = Substitute.For <IWriter>();
            _calculateVelocity       = new CalculateVelocity();
            _calculateCourse         = new CalculateCourse();
            _transponderReceiver     = Substitute.For <ITransponderReceiver>();
            _logWriterToFile         = Substitute.For <ILogWriter>();
            _logWriterToConsole      = Substitute.For <ILogWriter>();
            _convertStringToDateTime = new ConvertStringToDateTime();
            _eventController         = new EventController(_logWriterToFile, _logWriterToConsole);
            _seperationEvent         = new SeperationEvent();
            _seperationTracks        = new SeperationTracks(_seperationEvent, _eventController);
            _sortingTracks           = new SortingTracks(_calculateVelocity, _calculateCourse, _writer, _seperationTracks);
            _filterAirspace          = new FilterAirspace(_sortingTracks);
            _convertTrackData        = new ConvertTrackData(_transponderReceiver, _convertStringToDateTime, _filterAirspace);

            var track = "BIJ515;12345;54321;17891;20180409153742853";

            _myList = new List <string> {
                track
            };

            var eventArgs = new RawTransponderDataEventArgs(_myList);

            _transponderReceiver.TransponderDataReady += Raise.EventWith(eventArgs);
        }
        public void SetUp()
        {
            _logWriterToFile    = Substitute.For <ILogWriter>();
            _logWriterToConsole = Substitute.For <ILogWriter>();
            _eventController    = new EventController(_logWriterToFile, _logWriterToConsole);
            _seperationEvent    = new SeperationEvent();
            _seperationTracks   = new SeperationTracks(_seperationEvent, _eventController);
            _myTrackList        = new List <Track>();

            _date1  = new DateTime(2018, 4, 17, 20, 15, 12);
            _date2  = new DateTime(2018, 4, 17, 20, 15, 14);
            _track1 = new Track
            {
                Tag         = "JHL878",
                XCoordinate = 12345,
                YCoordinate = 98765,
                Altitude    = 19987,
                Timestamp   = _date1
            };
            _track2 = new Track
            {
                Tag         = "MDO724",
                XCoordinate = 12346,
                YCoordinate = 98766,
                Altitude    = 19988,
                Timestamp   = _date2
            };
        }
Beispiel #3
0
        public void SetUp()
        {
            _writer             = Substitute.For <IWriter>();
            _calculateVelocity  = new CalculateVelocity();
            _calculateCourse    = new CalculateCourse();
            _logWriterToFile    = Substitute.For <ILogWriter>();
            _logWriterToConsole = Substitute.For <ILogWriter>();
            _eventController    = new EventController(_logWriterToFile, _logWriterToConsole);
            _seperationEvent    = new SeperationEvent();
            _seperationTracks   = new SeperationTracks(_seperationEvent, _eventController);
            _sortingTracks      = new SortingTracks(_calculateVelocity, _calculateCourse, _writer, _seperationTracks);
            _filterAirspace     = new FilterAirspace(_sortingTracks);

            _myTrackList = new List <Track>();

            _date1 = new DateTime(2018, 04, 05, 20, 20, 18);
            _date2 = new DateTime(2018, 04, 05, 20, 20, 20);

            _track1 = new Track
            {
                Tag         = "BIJ515",
                XCoordinate = 90000,
                YCoordinate = 90000,
                Altitude    = 3000,
                Timestamp   = _date1
            };
            _track2 = new Track
            {
                Tag         = "BIJ515",
                XCoordinate = 9000,
                YCoordinate = 10000,
                Altitude    = 3000,
                Timestamp   = _date2
            };
        }
 public SortingTracks(ICalculateVelocity calculateVelocity, ICalculateCourse calculateCourse, IWriter writer, ISeperationTracks seperationTracks)
 {
     _calculateVelocity = calculateVelocity;
     _calculateCourse   = calculateCourse;
     _writer            = writer;
     _seperationTracks  = seperationTracks;
     _currentTrackList  = new List <Track>();
 }
Beispiel #5
0
        public void Setup()
        {
            _seperationEvent = new SeperationEvent();
            _eventController = Substitute.For <IEventController>();
            _uut             = new SeperationTracks(_seperationEvent, _eventController);

            _date1 = new DateTime(2018, 4, 17, 20, 15, 12);
            _date2 = new DateTime(2018, 4, 17, 20, 15, 14);
            _date3 = new DateTime(2018, 4, 17, 20, 16, 26);

            _track1 = new Track
            {
                Tag         = "BIJ515",
                XCoordinate = 12345,
                YCoordinate = 54321,
                Altitude    = 17000,
                Timestamp   = _date1
            };

            _track2 = new Track
            {
                Tag         = "QWF639",
                XCoordinate = 12346,
                YCoordinate = 54322,
                Altitude    = 17299,
                Timestamp   = _date2
            };

            _track3 = new Track()
            {
                Tag         = "PXL968",
                XCoordinate = 12346,
                YCoordinate = 54322,
                Altitude    = 17299,
                Timestamp   = _date3
            };

            _myList = new List <Track>
            {
                _track1,
                _track2
            };
        }
        public void SetUp()
        {
            _writer                  = Substitute.For <IWriter>();
            _calculateVelocity       = new CalculateVelocity();
            _calculateCourse         = new CalculateCourse();
            _transponderReceiver     = Substitute.For <ITransponderReceiver>();
            _logWriterToFile         = Substitute.For <ILogWriter>();
            _logWriterToConsole      = Substitute.For <ILogWriter>();
            _convertStringToDateTime = Substitute.For <IConvertStringToDateTime>();
            _eventController         = new EventController(_logWriterToFile, _logWriterToConsole);
            _seperationEvent         = new SeperationEvent();
            _seperationTracks        = new SeperationTracks(_seperationEvent, _eventController);
            _sortingTracks           = new SortingTracks(_calculateVelocity, _calculateCourse, _writer, _seperationTracks);
            _filterAirspace          = new FilterAirspace(_sortingTracks);
            _convertTrackData        = new ConvertTrackData(_transponderReceiver, _convertStringToDateTime, _filterAirspace);

            _myList = new List <string>();

            _eventArgs = new RawTransponderDataEventArgs(_myList);
        }
        public void SetUp()
        {
            _myNewList     = new List <Track>();
            _myCurrentList = new List <Track>();
            _date1         = new DateTime(2018, 4, 17, 20, 15, 12);
            _date2         = new DateTime(2018, 4, 17, 20, 15, 14);
            _date3         = new DateTime(2018, 4, 17, 20, 15, 14);
            _track1        = new Track
            {
                Tag         = "JHL878",
                XCoordinate = 12345,
                YCoordinate = 98765,
                Altitude    = 19987,
                Timestamp   = _date1
            };
            _track2 = new Track
            {
                Tag         = "JHL878",
                XCoordinate = 12345,
                YCoordinate = 98765,
                Altitude    = 19987,
                Timestamp   = _date2
            };
            _track3 = new Track
            {
                Tag         = "HHH878",
                XCoordinate = 12345,
                YCoordinate = 98765,
                Altitude    = 19987,
                Timestamp   = _date3
            };

            _myCurrentList.Add(_track1);
            _calculateCourse   = Substitute.For <ICalculateCourse>();
            _calculateVelocity = Substitute.For <ICalculateVelocity>();
            _writer            = Substitute.For <IWriter>();
            _seperationTracks  = Substitute.For <ISeperationTracks>();
            _uut = new SortingTracks(_calculateVelocity, _calculateCourse, _writer, _seperationTracks);
        }