public ActionResult SearchFlightsResults() { try { string searchBy = Request.Form["SearchBy"]; string searchText = Request.Form["SearchText"]; string searchFlights = Request.Form["SearchFlights"]; IList <FullFlightData> flights = anonymousFacade.SearchFlights(searchBy, searchText, searchFlights); ViewBag.Flights = flights; return(View()); } catch (Exception e) { Console.WriteLine(e.Message); return(Redirect("http://localhost:9002/page/SearchFlights")); } }
public void Search_Flights_With_No_Parameters() { Execute_Test(() => { IList <Flight> flights = anonymous_facade.SearchFlights(); Assert.AreEqual(flights.Count, 6); }); }