public void Update(IFlightParser flightParser) { Flight next = flightParser.GetNext(); while (next != null) { HandleFlight(next); next = flightParser.GetNext(); } Notify(this); }
public void Update_MultipleValues_ListIsCorrect() { _fakeFlightParser.GetNext().Returns( x => _multipleFlights[0], x => _multipleFlights[1], x => _multipleFlights[2], x => null ); _uut.Update(_fakeFlightParser); Assert.AreEqual(_uut.GetFlights(), _multipleFlights); }