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(); _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 = Substitute.For <ICalculateVelocity>(); _calculateCourse = Substitute.For <ICalculateCourse>(); _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); _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 }; }
public SortingTracks(ICalculateVelocity calculateVelocity, ICalculateCourse calculateCourse, IWriter writer, ISeperationTracks seperationTracks) { _calculateVelocity = calculateVelocity; _calculateCourse = calculateCourse; _writer = writer; _seperationTracks = seperationTracks; _currentTrackList = new List <Track>(); }
public CheckPlanes(ICalculateVelocity cv, ICalculateCourse cc, IRenedition rr) { _cc = cc; _cv = cv; _rr = rr; Planes = new List <IPlane>(); ListOfTags = new List <string>(); }
public DecodingWithMethod(ITransponderReceiver rawReceiver, ITrackReceiver trackReceiver) { //When data from flight bleeps in rawReceiver.TransponderDataReady += OnRawData; _trackList = new List <TrackData>(); _outputTrackReceiver = trackReceiver; _tempTrackList = new List <TrackData>(); _calculateCourse = new CalculateCourse(); _calculateVelocity = new CalculateVelocity(); _trackValidation = new TrackValidation(); _track = new Track(); _trackSeperation = new TrackSeperation(); }
public void SetUp() { fakePlane1 = Substitute.For <IPlane>(); fakePlane2 = Substitute.For <IPlane>(); uut = new CalculateCourse(); fakePlane1 = new Plane(); fakePlane1.Tag = "ABC123"; fakePlane1.XCoordinate = 5000; fakePlane1.YCoordinate = 5000; fakePlane2 = new Plane(); fakePlane2.Tag = "ABC123"; fakePlane2.XCoordinate = 1000; fakePlane2.YCoordinate = 1000; }
public void Setup() { _uut = new CalculateCourse(); _track1 = new Track { Tag = "BIJ515", XCoordinate = 90000, YCoordinate = 90000 }; _track2 = new Track { Tag = "BIJ515", XCoordinate = 10000, YCoordinate = 10000 }; }
public void SetUp() { _uut = new CalculateCourse(); _track1 = new TrackData { Tag = "ABC123", X = 90000, Y = 90000 }; _track2 = new TrackData() { Tag = "ABC123", X = 10000, Y = 10000 }; }
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); }
public void SetUp() { receivedData = new EnterEventArgs.Msg(); nEventsReceived = 0; newfakePlanes = new List <IPlane>(); currentfakePlanes = new List <IPlane>(); time1 = new DateTime(2010, 10, 10, 00, 01, 00); time2 = new DateTime(2010, 10, 10, 00, 02, 00); fakePlane1 = new Plane(); fakePlane1.Tag = "ABC123"; fakePlane1.XCoordinate = 1000; fakePlane1.YCoordinate = 1000; fakePlane1.Altitude = 17100; fakePlane1.TimeStamp = time1; currentfakePlanes.Add(fakePlane1); fakeCalculateCourse = Substitute.For <ICalculateCourse>(); fakeCalculateVelocity = Substitute.For <ICalculateVelocity>(); fakeRenedition = Substitute.For <IRenedition>(); fakeIEnterEvent = Substitute.For <IEnterEvent>(); uut = new CheckPlanes(fakeCalculateVelocity, fakeCalculateCourse, fakeRenedition); fakeListOfTags = CheckPlanes.ListOfTags; fakeIEnterEvent.RaisedEnterEvent += (o, args) => { receivedData = args.Message; ++nEventsReceived; }; }