public void TestAbleToFlyOnFridays() { SearchPage searchPage = new SearchPage(Driver); searchPage.Open(); searchPage.SelectFlightFrom("Luton"); searchPage.SelectFlightTo("Porto"); searchPage.SetOneWayJourney(); var date = DataTimeHelper.GetFridayDate(); searchPage.SetOutBoundDate(date.Day.ToString(), date.Month.ToString(), date.Year.ToString()); searchPage.SelectAdultsNum("1").SelectChildrenNum("0").SelectInfantsNum("0"); BookingPage bookingPage = searchPage.ClickShowFlights(); Assert.IsFalse(bookingPage.HasFlights(), "You can not fly on Friday"); }
public void TestAbleToFlightFor2AdultsAnd1Children() { SearchPage searchPage = new SearchPage(Driver); searchPage.Open(); searchPage.SelectFlightFrom("Luton"); searchPage.SelectFlightTo("Barcelona"); var fromDate = DataTimeHelper.AddDaysToCurrentDate(3); searchPage.SetOutBoundDate(fromDate.Day.ToString(), fromDate.Month.ToString(), fromDate.Year.ToString()); var toDate = fromDate.AddDays(5); searchPage.SetReturnDate(toDate.Day.ToString(), toDate.Month.ToString(), toDate.Year.ToString()); searchPage.SelectAdultsNum("2").SelectChildrenNum("1").SelectInfantsNum("0"); BookingPage bookingPage = searchPage.ClickShowFlights(); Assert.IsTrue(bookingPage.HasFlights(), "You can not fly with such preferences"); }