IMakeAHotelBookingGuestDetailsAuto IMakeAHotelBookingGuestDetails.AutoFill() { this.guests.Last().Title = PaymentPageRnd.PickRandomGuestTitle(); this.guests.Last().FirstName = PaymentPageRnd.PickRandomGuestFirstName(); this.guests.Last().LastName = PaymentPageRnd.PickRandomGuestLastName(); return(this); }
IMakeABookingContactDetailsAuto IMakeABookingContactDetails.AutoFill() { this.contactFirstName = PaymentPageRnd.PickRandomContactFirstName(); this.contactLastName = PaymentPageRnd.PickRandomContactLastName(); this.contactEmail = PaymentPageRnd.PickRandomContactEmail(); this.contactPhoneNumber = PaymentPageRnd.PickRandomContactPhoneNumber(); 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); }
IMakeABookingPaymentDetailsAuto IMakeABookingPaymentDetails.AutoFill() { this.paymentCardType = PaymentPageRnd.PickRandomPaymentCardType(); this.paymentCardNumber = PaymentPageRnd.PickRandomPaymentCardNumber(); this.paymentExpiryDate = PaymentPageRnd.PickRandomPaymentExpiryDate(); this.paymentSecurityCode = PaymentPageRnd.PickRandomPaymentSecurityCode(); this.paymentCardHolderName = PaymentPageRnd.PickRandomPaymentCardHolderName(); this.paymentPostCode = PaymentPageRnd.PickRandomPaymentPostCode(); return(this); }
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); }
IMakeABookingStaffDetailsAuto IMakeABookingStaffDetails.AutoFill() { this.staffReference = PaymentPageRnd.PickRandomStaffReference(); this.staffCustomerPhone = PaymentPageRnd.PickRandomStaffCustomerPhone(); return(this); }