public TrackWarehouse(ITagsManager tagsManager, ICourseCalculator courseCalculator, IVelocityCalculator velocityCalculator, ITracksManager tracksManager, ISeperationEventChecker seperationEventChecker) { _tagsManager = tagsManager; _courseCalculator = courseCalculator; _velocityCalculator = velocityCalculator; _tracksManager = tracksManager; _seperationEventChecker = seperationEventChecker; _tracksInAirspace = new List <Track>(); _tagsInAirspace = new List <string>(); }
public void SetUp() { _transponderReceiver = Substitute.For <ITransponderReceiver>(); _trackTransmitter = new TrackTransmitter(); _dateTimeBuilder = new DateTimeBuilder(); _trackObjectifier = new TrackObjectifier(_dateTimeBuilder); _trackReciever = new TrackReciever(_transponderReceiver, _trackObjectifier, _trackTransmitter); _output = Substitute.For <IOutput>(); _tracksManager = Substitute.For <ITracksManager>(); _tagsManager = Substitute.For <ITagsManager>(); _courseCalculator = Substitute.For <ICourseCalculator>(); _velocityCalculator = Substitute.For <IVelocityCalculator>(); _seperationEventChecker = Substitute.For <ISeperationEventChecker>(); _uut = new TrackWarehouse(_tagsManager, _courseCalculator, _velocityCalculator, _tracksManager, _seperationEventChecker); _atmController = new AtmController(_trackTransmitter, _output, _uut); _list = new List <string> { "ATR423;39045;12932;14000;20151006213456000" }; _trackTransmitter.TrackReady += (o, args) => { _recievedTracks = args.TrackList; }; // Arrange _tags = new List <string> { "ATR423" }; _tagsManager.WhenForAnyArgs(x => x.Manage(ref _tags, new List <Track>())) .Do(x => x[0] = _tags); // Act _transponderReceiver.TransponderDataReady += Raise.EventWith(new RawTransponderDataEventArgs(_list)); }