static void Main(string[] args) { List <String> transponderdataList = new List <string>(); var track1 = "BIJ515;12345;54321;17891;20180409153742853"; var track2 = "BIJ516;12345;54322;17891;20180409153742853"; transponderdataList.Add(track1); transponderdataList.Add(track2); Faketransponderreciever myReciever = new Faketransponderreciever(transponderdataList); //var myReciever = Faketransponderreciever.ITransponderReceiver.CreateTransponderDataReceiver(); IConvertStringToDateTime convertStringToDateTime = new ConvertStringToDateTime(); ICalculateVelocity calculateVelocity = new CalculateVelocity(); ICalculateCourse calculateCourse = new CalculateCourse(); IWriter writer = new ConsoleWriter(); ILogWriter logWriterToFile = new LogWriter(); ILogWriter logWriterToConsole = new LogWriter(); SeperationEvent seperationEvent = new SeperationEvent(); IEventController eventController = new EventController(logWriterToFile, logWriterToConsole); ISeperationTracks seperationTracks = new SeperationTracks(seperationEvent, eventController); ISortingTracks sortingTracks = new SortingTracks(calculateVelocity, calculateCourse, writer, seperationTracks); IFilterAirspace filterAirspace = new FilterAirspace(sortingTracks); IConvertTrackData convertTrackData = new ConvertTrackData(myReciever, convertStringToDateTime, filterAirspace); Console.ReadKey(); }
static void Main(string[] args) { var myReciever = TransponderReceiverFactory.CreateTransponderDataReceiver(); IConvertStringToDateTime convertStringToDateTime = new ConvertStringToDateTime(); ICalculateVelocity calculateVelocity = new CalculateVelocity(); ICalculateCourse calculateCourse = new CalculateCourse(); IWriter writer = new ConsoleWriter(); ILogWriter logWriterToFile = new LogWriter(); ILogWriter logWriterToConsole = new ConsoleSeperation(); SeperationEvent seperationEvent = new SeperationEvent(); IEventController eventController = new EventController(logWriterToFile, logWriterToConsole); ISeperationTracks seperationTracks = new SeperationTracks(seperationEvent, eventController); ISortingTracks sortingTracks = new SortingTracks(calculateVelocity, calculateCourse, writer, seperationTracks); IFilterAirspace filterAirspace = new FilterAirspace(sortingTracks); IConvertTrackData convertTrackData = new ConvertTrackData(myReciever, convertStringToDateTime, filterAirspace); Console.ReadKey(); }
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); }