Exemplo n.º 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()
        {
            _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);
        }
Exemplo n.º 4
0
 public ConvertTrackData(ITransponderReceiver transponderReceiver, IConvertStringToDateTime convertStringToDateTime, IFilterAirspace filterAirspace)
 {
     transponderReceiver.TransponderDataReady += TransponderReceiver_TransponderDataReady;
     _convertStringToDateTime = convertStringToDateTime;
     _filterAirspace          = filterAirspace;
 }