Beispiel #1
0
 IMakeAHotelBookingGuestDetailsAuto IMakeAHotelBookingGuestDetails.AutoFill()
 {
     this.guests.Last().Title     = PaymentPageRnd.PickRandomGuestTitle();
     this.guests.Last().FirstName = PaymentPageRnd.PickRandomGuestFirstName();
     this.guests.Last().LastName  = PaymentPageRnd.PickRandomGuestLastName();
     return(this);
 }
 IMakeAFlightAndHotelBookingGuestDetailsAuto IMakeAFlightAndHotelBookingGuestDetails.AutoFill()
 {
     this.guests.Last().Title     = PaymentPageRnd.PickRandomGuestTitle();
     this.guests.Last().FirstName = PaymentPageRnd.PickRandomGuestFirstName();
     this.guests.Last().LastName  = PaymentPageRnd.PickRandomGuestLastName();
     this.guests.Last().DoB       = PaymentPageRnd.PickRandomGuestDoB(GetGuestAge(this.guests.Count));
     return(this);
 }
Beispiel #3
0
        IMakeAHotelBookingGuestDetailsAuto IMakeAHotelBookingAllGuests.AutoFill()
        {
            int count = HomePage.Data.Rooms.Sum(i => i.Adults.GetValueOrDefault(0) + i.Children.GetValueOrDefault(0));

            for (int index = 0; index < count; index++)
            {
                this.guests.Add(new Guest(index + 1)
                {
                    Title       = PaymentPageRnd.PickRandomGuestTitle()
                    , FirstName = PaymentPageRnd.PickRandomGuestFirstName()
                    , LastName  = PaymentPageRnd.PickRandomGuestLastName()
                });
            }

            return(this);
        }
        IMakeAFlightAndHotelBookingGuestDetailsAuto IMakeAFlightAndHotelBookingAllGuests.AutoFill()
        {
            int count = HomePage.Data.Rooms.Sum(i => i.Adults.GetValueOrDefault(0) + i.Children.GetValueOrDefault(0));

            for (int index = 0; index < count; index++)
            {
                this.guests.Add(new Guest(this.guests.Count(i => i.RoomNumber == GetRoomNumber(this.guests.Count + 1)) + 1)
                {
                    Title        = PaymentPageRnd.PickRandomGuestTitle()
                    , FirstName  = PaymentPageRnd.PickRandomGuestFirstName()
                    , LastName   = PaymentPageRnd.PickRandomGuestLastName()
                    , RoomNumber = GetRoomNumber(this.guests.Count + 1)
                    , DoB        = PaymentPageRnd.PickRandomGuestDoB(GetGuestAge(this.guests.Count + 1))
                });
            }

            return(this);
        }