Exemple #1
0
 public void SetUp()
 {
     _trackRemover           = new TrackRemover();
     _fakeTrackManagement    = Substitute.For <ITrackManagement>();
     _fakeAirspaceController = Substitute.For <IAirspaceController>();
     _flightManagement       = new AirTrafficMonitoring.FlightManagement.FlightManagement(_fakeAirspaceController, _trackRemover, _fakeTrackManagement);
 }
        public void SetUp()
        {
            _trackRemover       = new TrackRemover();
            _trackManagement    = new TrackManagement();
            _timeSpanCalculator = new TimeSpanCalculator();
            _distanceCalculator = new DistanceCalculator();
            _velocityCalculator = new VelocityCalculator(_timeSpanCalculator, _distanceCalculator);
            _velocityAnalyzer   = new VelocityAnalyzer(_velocityCalculator);
            _compassCalculator  = new CompassCalculator();
            _courseAnalyzer     = new CourseAnalyzer(_compassCalculator);

            _altitudeDistanceCalculator = new AltitudeDistanceCalculator();
            _collisionAnalyzer          = new CollisionAnalyzer(_distanceCalculator, _altitudeDistanceCalculator);
            _separationStringBuilder    = new SeparationStringBuilder();
            _fakeFileWriter             = Substitute.For <IFileWriter>();

            _airspace                    = new Airspace();
            _airspaceTrackChecker        = new AirspaceTrackChecker(_airspace);
            _fakeTransponderDataReciever = Substitute.For <ITransponderDataReciever>();
            _airspaceController          = new AirTrafficMonitoring.AirspaceController.AirspaceController(_fakeTransponderDataReciever, _airspaceTrackChecker);

            _flightManagement    = new AirTrafficMonitoring.FlightManagement.FlightManagement(_airspaceController, _trackRemover, _trackManagement);
            _flightAnalyzer      = new AirTrafficMonitoring.FlightAnalyzer.FlightAnalyzer(_flightManagement, _courseAnalyzer, _velocityAnalyzer);
            _collisionController = new AirTrafficMonitoring.CollisionController.CollisionController(_flightManagement, _collisionAnalyzer, _separationStringBuilder);
            _logger = new AirTrafficMonitoring.CollisionController.Logger(_collisionController, "", _fakeFileWriter);
        }
 public FlightManagement(IAirspaceController airspaceController, ITrackRemover trackRemover,
                         ITrackManagement trackManagement)
 {
     airspaceController.TrackOutsideAirspace += HandleTrackOutsideAirspace;
     airspaceController.TrackInAirspace      += HandleTrackInsideAirspace;
     _trackRemover    = trackRemover;
     _trackManagement = trackManagement;
     _newestTracks    = new List <Track>();
     _oldestTracks    = new List <Track>();
 }
 public void SetUp()
 {
     _trackRemover           = new TrackRemover();
     _fakeTrackManagement    = new TrackManagement();
     _fakeAirspaceController = Substitute.For <IAirspaceController>();
     _timeSpanCalculator     = new TimeSpanCalculator();
     _distanceCalculator     = new DistanceCalculator();
     _velocityCalculator     = new VelocityCalculator(_timeSpanCalculator, _distanceCalculator);
     _velocityAnalyzer       = new VelocityAnalyzer(_velocityCalculator);
     _compassCalculator      = new CompassCalculator();
     _courseAnalyzer         = new CourseAnalyzer(_compassCalculator);
     _flightManagement       = new AirTrafficMonitoring.FlightManagement.FlightManagement(_fakeAirspaceController, _trackRemover, _fakeTrackManagement);
     _flightAnalyzer         = new AirTrafficMonitoring.FlightAnalyzer.FlightAnalyzer(_flightManagement, _courseAnalyzer, _velocityAnalyzer);
 }
 public void SetUp()
 {
     _fakeTrackRemover       = Substitute.For <ITrackRemover>();
     _fakeAirspaceController = Substitute.For <IAirspaceController>();
 }