public void ModifyAirlineDetails()
        {
            UserRepository testUr    = new UserRepository("dad", "aes", RolesEnum.admin);
            Admin          testAdmin = new Admin("dav,", "id", 3);

            FlyingCenterSystem.GetInstance().TryLogin(ur.UserName, ur.Password, out ILogin token,
                                                      out FacadeBase facade);
            LoginToken <Admin>          myToken  = token as LoginToken <Admin>;
            LoggedInAdministratorFacade myFacade = facade as LoggedInAdministratorFacade;

            myFacade.CreateNewAdmin(myToken, testUr, testAdmin);
            Country country = new Country("Israel");

            myFacade.CreateNewCountry(myToken, country);
            AirlineCompany airlineCompany = new AirlineCompany("ElALL", 1, country.ID);
            UserRepository airlineTestUr  = new UserRepository("rad", "ass", RolesEnum.airline);

            myFacade.CreateNewAirline(myToken, airlineTestUr, airlineCompany, country);
            Flight flight = new Flight(DateTime.Now, DateTime.Now, 50, airlineCompany.ID, country.ID, country.ID);

            FlyingCenterSystem.GetInstance().TryLogin(airlineTestUr.UserName, airlineTestUr.Password, out ILogin tokenAir,
                                                      out FacadeBase facadeAir);
            LoginToken <AirlineCompany> myTokenair  = tokenAir as LoginToken <AirlineCompany>;
            LoggedInAirlineFacade       myFacadeAir = facadeAir as LoggedInAirlineFacade;

            airlineCompany.AirlineName = "Yes";
            myFacadeAir.ModifyAirlineDetails(myTokenair, airlineCompany);
            AirlineCompany airlineCompany1 = myFacade.GetAirlineCompanyByid(myToken, airlineCompany.ID.ToString());

            Assert.AreEqual(airlineCompany.AirlineName, airlineCompany1.AirlineName);
        }
        public void RemoveAirlineCompanyAndItsUserRepository()
        {
            UserRepository testUr    = new UserRepository("dad", "aes", RolesEnum.admin);
            Admin          testAdmin = new Admin("dav,", "id", 3);

            FlyingCenterSystem.GetInstance().TryLogin(ur.UserName, ur.Password, out ILogin token,
                                                      out FacadeBase facade);
            LoginToken <Admin>          myToken  = token as LoginToken <Admin>;
            LoggedInAdministratorFacade myFacade = facade as LoggedInAdministratorFacade;

            myFacade.CreateNewAdmin(myToken, testUr, testAdmin);
            Country country = new Country("Israel");

            myFacade.CreateNewCountry(myToken, country);
            AirlineCompany airlineCompany = new AirlineCompany("ElALL", 1, country.ID);
            UserRepository airlineTestUr  = new UserRepository("rad", "ass", RolesEnum.airline);

            myFacade.CreateNewAirline(myToken, airlineTestUr, airlineCompany, country);
            Flight flight = new Flight(DateTime.Now, DateTime.Now, 50, airlineCompany.ID, country.ID, country.ID);

            FlyingCenterSystem.GetInstance().TryLogin(airlineTestUr.UserName, airlineTestUr.Password, out ILogin tokenAir,
                                                      out FacadeBase facadeAir);
            LoginToken <AirlineCompany> myTokenair  = tokenAir as LoginToken <AirlineCompany>;
            LoggedInAirlineFacade       myFacadeAir = facadeAir as LoggedInAirlineFacade;

            myFacadeAir.CreateFlight(myTokenair, flight);
            AnonymousUserFacade anonymousUserFacade    = new AnonymousUserFacade();
            Customer            customer               = new Customer("asdjkb", "fgh", "adthv", "0506794532", "123479520589243", 2);
            UserRepository      customerUserRepository = new UserRepository("radp", "ass", RolesEnum.customer);

            anonymousUserFacade.CreateCustomerAndUserRepository(customerUserRepository, customer);
            FlyingCenterSystem.GetInstance().TryLogin(customerUserRepository.UserName, customerUserRepository.Password, out ILogin tokenCustomer,
                                                      out FacadeBase facadeCustomer);
            LoginToken <Customer>  myTokencustomer        = tokenCustomer as LoginToken <Customer>;
            LoggedInCustomerFacade loggedInCustomerFacade = facadeCustomer as LoggedInCustomerFacade;

            loggedInCustomerFacade.PurchaseTicket(myTokencustomer, flight);
            myFacade.RemoveAirline(myToken, airlineCompany.User_Repository_ID.ToString());
            AirlineCompany airlineCompany1 = myFacade.GetAirlineCompanyByid(myToken, airlineCompany.ID.ToString());
        }
        public void AddAirlineCompanyAndGetIt()
        {
            UserRepository testUr    = new UserRepository("dad", "aes", RolesEnum.admin);
            Admin          testAdmin = new Admin("dav,", "id", 3);

            FlyingCenterSystem.GetInstance().TryLogin(ur.UserName, ur.Password, out ILogin token,
                                                      out FacadeBase facade);
            LoginToken <Admin>          myToken  = token as LoginToken <Admin>;
            LoggedInAdministratorFacade myFacade = facade as LoggedInAdministratorFacade;

            myFacade.CreateNewAdmin(myToken, testUr, testAdmin);
            Country country = new Country("Israel");

            myFacade.CreateNewCountry(myToken, country);
            AirlineCompany airlineCompany = new AirlineCompany("ElALL", 1, country.ID);
            UserRepository airlineTestUr  = new UserRepository("rad", "ass", RolesEnum.airline);

            myFacade.CreateNewAirline(myToken, airlineTestUr, airlineCompany, country);
            AirlineCompany airlineCompany1 = myFacade.GetAirlineCompanyByid(myToken, airlineCompany.ID.ToString());

            Assert.AreEqual(airlineCompany.ID, airlineCompany1.ID);
        }