Exemple #1
0
        public void Setup()
        {
            _eventHandled = false;

            _airspace = Substitute.For <IAirspace>();
            _receiver = Substitute.For <ITransponderReceiver>();

            _uut = new FlightDecoder(_airspace, _receiver);

            _receiver.TransponderDataReady += (sender, args) => _eventHandled = true;
            _receiver.TransponderDataReady += (sender, args) => _transponderDataEventArgs = args;
        }
        static void Main(string[] args)
        {
            var airspace = new Airspace(new FlightValidator(), 80000, 80000, 500, 20000);
            var decoder  = new FlightDecoder(airspace, TransponderReceiverFactory.CreateTransponderDataReceiver());


            var log        = new FileLog();
            var separation = new FlightSeparation(log, airspace);
            var monitor    = new ConsoleMonitor(new ConsoleLog(), airspace, separation);

            while (true)
            {
                Thread.Sleep(100);
            }
        }