public void GetAllFlightsVacancy() { countryDAO.Add(new Country("Israel")); Country israel = countryDAO.GetCountryByName("Israel"); airlineDAO.Add(new AirlineCompany("ELAL", "USERNAME", "PASSWORD", israel.ID)); AirlineCompany elal = airlineDAO.GetAirlineByName("ELAL"); flightDAO.Add(new Flight(elal.ID, israel.ID, israel.ID, new DateTime((DateTime.Now.Year + 2), 12, 5, 14, 00, 00), new DateTime((DateTime.Now.Year + 2), 12, 7, 14, 00, 00), 50, FlightStatus.NotDeparted)); flightDAO.Add(new Flight(elal.ID, israel.ID, israel.ID, new DateTime((DateTime.Now.Year + 2), 12, 5, 14, 00, 00), new DateTime((DateTime.Now.Year + 2), 12, 7, 14, 00, 00), 20, FlightStatus.NotDeparted)); Dictionary <Flight, int> vacancy = flightDAO.GetAllFlightsVacancy(); Assert.AreEqual(50, vacancy[flightDAO.GetAll()[0]]); Assert.AreEqual(20, vacancy[flightDAO.GetAll()[1]]); }
public Dictionary <Flight, int> GetAllFlightsVacancy() { return(_flightDAO.GetAllFlightsVacancy()); }