private void Init_Customer_Facade_Data() { _logger.Debug($"Start Init Customer Tests Data"); string username = "******"; string password = "******"; system.TryLogin(username, password, out ILoginToken admin_token, out FacadeBase admin_facade); LoggedInAdministratorFacade loggedInAdministratorFacade = admin_facade as LoggedInAdministratorFacade; LoginToken <Administrator> adminLoginToken = admin_token as LoginToken <Administrator>; int country_id = loggedInAdministratorFacade.CreateNewCountry(adminLoginToken, TestData.Get_Countries_Data()[0]); loggedInAdministratorFacade.CreateNewCountry(adminLoginToken, TestData.Get_Countries_Data()[1]); loggedInAdministratorFacade.CreateNewCountry(adminLoginToken, TestData.Get_Countries_Data()[2]); loggedInAdministratorFacade.CreateNewCustomer(adminLoginToken, TestData.Get_Customers_Data()[0]); loggedInAdministratorFacade.CreateNewCustomer(adminLoginToken, TestData.Get_Customers_Data()[1]); AirlineCompany airlineCompany = TestData.Get_AirlineCompanies_Data()[0]; airlineCompany.CountryId = country_id; loggedInAdministratorFacade.CreateNewAirlineCompany(adminLoginToken, airlineCompany); system.TryLogin(airlineCompany.User.UserName, airlineCompany.User.Password, out ILoginToken airline_token, out FacadeBase airline_facade); LoggedInAirlineFacade loggedInAirlineFacade = airline_facade as LoggedInAirlineFacade; LoginToken <AirlineCompany> airlineLoginToken = airline_token as LoginToken <AirlineCompany>; Flight flight = TestData.Get_Flights_Data()[3]; Flight flight2 = TestData.Get_Flights_Data()[4]; Flight flight3 = TestData.Get_Flights_Data()[5]; long flight_id = loggedInAirlineFacade.CreateFlight(airlineLoginToken, flight); long flight_id2 = loggedInAirlineFacade.CreateFlight(airlineLoginToken, flight2); long flight_id3 = loggedInAirlineFacade.CreateFlight(airlineLoginToken, flight3); flight.Id = flight_id; flight2.Id = flight_id2; flight3.Id = flight_id3; system.TryLogin(TestData.Get_Customers_Data()[1].User.UserName, TestData.Get_Customers_Data()[1].User.Password, out ILoginToken token, out FacadeBase facade); LoginToken <Customer> cust_token = token as LoginToken <Customer>; LoggedInCustomerFacade cust_facade = facade as LoggedInCustomerFacade; cust_facade.PurchaseTicket(cust_token, flight); Login(TestData.Get_Customers_Data()[0].User.UserName, TestData.Get_Customers_Data()[0].User.Password); _logger.Debug($"End Init Customer Tests Data"); }