Esempio n. 1
0
        public void FlightFuncsTest()
        {
            FlightDAOMSSQL flight = new FlightDAOMSSQL();

            flight.RemoveAll();
            CountryDAOMSSQL c = new CountryDAOMSSQL();

            c.RemoveAll();
            AirlineDAOMSSQL airline = new AirlineDAOMSSQL();

            airline.RemoveAll();
            Country c1 = new Country("israel");

            c.Add(c1);
            AirlineCompany airline1 = new AirlineCompany("eldal", "maher", "123", c1.Id);

            airline.Add(airline1);
            DateTime t  = DateTime.Now;
            DateTime t1 = new DateTime(2019, 8, 20, 22, 33, 22);
            Flight   f1 = new Flight(airline1.Id, c1.Id, c1.Id, t, t1, 22);

            flight.Add(f1);
            Assert.AreEqual(f1, flight.GetFlighstByOriginCountry(f1.OriginCountryCode)[0]);
        }