public void DeleteCountryExceptionTest()
        {
            CountryDAOMSSQL c       = new CountryDAOMSSQL();
            Country         country = c.Get(TestCenter.AirlineToken.User.CountryCode);

            TestCenter.AdminFacade.DeleteCountry(TestCenter.AdminToken, country);
        }
        public void GetCountryByNameTest()
        {
            CountryDAOMSSQL c       = new CountryDAOMSSQL();
            Country         country = c.Get(TestCenter.AirlineToken.User.CountryCode);

            Assert.AreEqual(country, TestCenter.AdminFacade.GetCountryByName(TestCenter.AdminToken, country.CountryName));
        }
Exemple #3
0
        public void CountryFuncsTest()
        {
            FlightDAOMSSQL flight = new FlightDAOMSSQL();

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

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

            airline.RemoveAll();
            Country c1, c2;

            c1 = new Country("UAE"); c2 = new Country("England");
            CountryDAOMSSQL country = new CountryDAOMSSQL();

            country.RemoveAll();
            country.Add(c1);
            country.Add(c2);
            country.Remove(c2);
            IList <Country> countries      = country.GetAll();
            Country         updatedCountry = country.Get(c1.Id); updatedCountry.CountryName = "Spain";

            country.Update((updatedCountry));
            Assert.AreEqual(updatedCountry, countries[0]);
        }
Exemple #4
0
        public void UpdateCountry()
        {
            Country countryTest = new Country("Israel");

            countryDAO.Add(countryTest);
            countryTest = countryDAO.GetCountryByName("Israel");

            countryTest.CountryName = "India";
            facade.UpdateCountry(countryTest);

            Assert.AreEqual(countryTest.ID, countryDAO.GetCountryByName("India").ID);
            Assert.AreEqual("India", countryDAO.Get(countryTest.ID).CountryName);
        }