private void Setup_Factory() { mockFactory = Substitute.For <IAirTrafficMonitorFactory>(); /* * Commented these out. Factory has private setter now /Frank * * mockFactory.Airspace = Substitute.For<IAirspace>(); * mockFactory.AirspaceService = Substitute.For<IAirspaceService>(); * mockFactory.SeparationService = Substitute.For<ISeparationService>(); * mockFactory.TrackingService = Substitute.For<ITrackingService>();*/ }
public AirTrafficMonitor(IAirTrafficMonitorFactory factory, ITransponderReceiver receiver) { _separationService = factory.SeparationService; _trackingService = factory.TrackingService; _airspaceService = factory.AirspaceService; _airspace = factory.Airspace; //Subscribe to events. receiver.TransponderDataReady += TransponderReceiver_DataReady; //Initialize _trackings = new HashSet <ITrack>(); _separationEvents = new HashSet <ISeparationEvent>(); }