Пример #1
0
        Dictionary <string, List <Flight> > IAirSvc.GetFlights(DateTime DepartureTime, DateTime LandingTime, string destination, int numberOfSeats)
        {
            Dictionary <string, List <Flight> > freeFlights = new Dictionary <string, List <Flight> >();

            freeFlights = FindFlight.Search(flights, DepartureTime, LandingTime, destination, numberOfSeats);

            return(freeFlights);
        }
Пример #2
0
        public FindFlightResult GetFindFlight(FindFlight model)
        {
            IApiConnector <FindFlightResult, ApiError> connector = new ApiConnector <FindFlightResult, ApiError>();

            var requestUrl = _apiConnectionString
                             .AppendPathSegment("FindFlight")
                             .SetQueryParams(new
            {
                origin          = model.origin,
                destination     = model.destination,
                include_ex_data = model.include_ex_data,
                type            = model.type,
                filter          = model.filter,
                howMany         = model.howMany,
                offset          = model.offset
            });

            return(connector.GetRequest(requestUrl, checkfield, "Basic", _credentials).Responce);
        }
        public void BookaTrip()
        {
            Login login = new Login(driver); // Creating an instance of class login

            login.goToPage();                // Invoking gotoPage Method defined in class Login
            login.logindetails();            // Invoking method logindetails defined in class Login

            FindFlight fndflight = login.clickonLoginBtn();

            fndflight.gotofindflight();

            reserveFlights reserve = fndflight.clickonfindflightbtn();// Invoking method clickonfindflightbtn defined in class reserveFlights

            BookFlight Book = reserve.clickonreserveflightbtn();

            Book.gotobookflight();// Invoking method gotobookflight defined in class BookFlight
            Confirmation confirm = Book.buyflight();

            confirm.Asserts();// Invoking method assert defined in class Confirmation
        }
Пример #4
0
 public JsonResult findFlight(FindFlight model)
 {
     return(Json(_flightAwareAPI.GetFindFlight(model), JsonRequestBehavior.AllowGet));
 }
Пример #5
0
 public void FlightStatus()
 {
     FlightStatusButton.Click();
     wait.Until(ExpectedConditions.ElementIsVisible(MembershipNumber)).SendKeys("284");
     FindFlight.Click();
 }