Пример #1
0
 static FlightBuilder()
 {
     flight = new Flight();
     flight.Airport = new Airport();
     flight.Airline = new Airline();
     flight.ScheduledTime = DateTime.Now.InTimeZone(+1);
     flight.FlightStatus = new FlightStatus();
 }
        public static IEnumerable<Flight> CreateFlights(int number, Direction direction)
        {
            for(var i = 0; i < number; ++i)
            {
                var flight = new Flight(GetRandomAirline(), GetRandomAirport());
                flight.FlightId = flight.Airline.Code + "12" + i;
                flight.Direction = direction;
                flight.ScheduledTime = new DateTime(2010, 1, 1, 10 + i, 15, 0);
                flight.Gate = GetRandomGate();
                flight.Belt = GetRandomBelt();
                flight.FlightStatus = direction == Direction.Arrival ? GetRandomArrivalStatus() : GetRandomDepartureStatus();

                yield return flight;
            }
        }
Пример #3
0
 public void Setup()
 {
     _flight = new Flight();
 }