Пример #1
0
        public void Setup()
        {
            //Create attributes for tests
            _fakeFlightParser = Substitute.For <IFlightParser>();

            _uut = Substitute.For <FlightHandler>();

            _multipleFlights = new List <Flight>
            {
                new Flight()
                {
                    tag      = "ATR423",
                    position = new Coords(39045, 12932, 14000),
                },
                new Flight()
                {
                    tag      = "BCD123",
                    position = new Coords(10005, 85890, 12000),
                },
                new Flight()
                {
                    tag      = "XYZ987",
                    position = new Coords(25059, 75654, 4000),
                }
            };
        }
        public void Update(IFlightParser flightParser)
        {
            Flight next = flightParser.GetNext();

            while (next != null)
            {
                HandleFlight(next);
                next = flightParser.GetNext();
            }
            Notify(this);
        }