Пример #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);
        }
Пример #2
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 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()
        {
            _convertStringToDateTime = new ConvertStringToDateTime();
            _filterAirspace          = Substitute.For <IFilterAirspace>();
            _transponderReceiver     = Substitute.For <ITransponderReceiver>();
            _uut = new ConvertTrackData(_transponderReceiver, _convertStringToDateTime, _filterAirspace);

            _track     = new Track();
            _tracklist = new List <Track> {
                _track
            };

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

            _myList = new List <string> {
                track
            };

            var eventArgs = new RawTransponderDataEventArgs(_myList);

            _transponderReceiver.TransponderDataReady += Raise.EventWith(eventArgs);
        }
Пример #5
0
 public ConvertTrackData(ITransponderReceiver transponderReceiver, IConvertStringToDateTime convertStringToDateTime, IFilterAirspace filterAirspace)
 {
     transponderReceiver.TransponderDataReady += TransponderReceiver_TransponderDataReady;
     _convertStringToDateTime = convertStringToDateTime;
     _filterAirspace          = filterAirspace;
 }
 public void Setup()
 {
     _sortingTracks = Substitute.For <ISortingTracks>();
     _uut           = new FilterAirspace(_sortingTracks);
     _tracklist     = new List <Track>();
 }