public SeparationCondition(IAirTrafficManagementSystem atms) { this._atms = atms; this._atms.DataReady += DataReceived; _listOfConditionTracks = new List <Occurence>(); _SepCondEventArgsList = new List <SepCondEventArgs>(); }
public Renderer(IWriter writer, ISeparationCondition sepcond, IAirTrafficManagementSystem atms)//, ISeparationCondition sepcond) { _writer = writer; _condition = sepcond; _atms = atms; _atms.DataReady += OnDataReadyInATMS; _condition.RendererWarning += OnSepCondition; }
public void Setup() { date = DateTime.Now; mockWriter = Substitute.For <IWriter>(); stubAtms = Substitute.For <IAirTrafficManagementSystem>(); stubSepCond = Substitute.For <ISeparationCondition>(); uut = new Renderer(mockWriter, stubSepCond, stubAtms); trackInput = new List <Track>(); trackInput.Add(new Track("123456", 1000, 2000, 4000, date, 5000, 300)); }
public void Setup() { _argsReceived = null; // Creation of all the required classes _writer = Substitute.For <IWriter>(); _inputoutput = Substitute.For <IInputOutput>(); _atms = Substitute.For <IAirTrafficManagementSystem>(); sepcond = new SeparationCondition(_atms); _log = new NormalLogger("testfil", sepcond, _inputoutput); // Arguments that sepcond sends to Renderer when it makes an event _rendEventArgs = new RendEventArgs(); var sepcondlist = new List <SepCondEventArgs>(); sepcondlist.Add(_sepCondEventArgs); _rendEventArgs.ListOfCurrentConditions = sepcondlist; _rendEventArgs.TimeOfEvent = DateTime.Now; _atms.DataReady += (o, args) => { _argsReceived = args; }; sepcond.WarningEvent += (o, args2) => { _sepCondEventArgs = args2; }; sepcond.RendererWarning += (o, args3) => { _rendEventArgs = args3; }; }