public void checkDelTour() { countries contr = new countries(); countries.dataCountries.Rows.Add("1", "Америка"); Countries_Col obj = new Countries_Col(); hotels hot = new hotels(); hotels.dataHotels.Rows.Add("1", "hotel", "****", "12000"); HotelFactory hotelfac = new HotelFactory(); tours formTour = new tours(); tours.dataTours.Rows.Add("1", "tour", "VIP туры", "Россия", "True", "hotel", "Автобус", "BB", "12000", "Рубль"); tours.dataTours.Rows.Add("2", "tour", "VIP туры", "Россия", "True", "hotel", "Автобус", "BB", "12000", "Рубль"); tours.dataTours.Rows.Add("3", "tour", "VIP туры", "Россия", "True", "hotel", "Автобус", "BB", "12000", "Рубль"); FoodCol food = new FoodCol(); TransportCol tr = new TransportCol(); TourTypeCol tourtype = new TourTypeCol(); TourFactory factTour = new TourFactory(); int a = TourFactory.count(); TourFactory.DeleteTour(1); Assert.AreEqual(a - 1, TourFactory.count()); }
public void checkAddOrder() { string[] order = new string[7]; order[0] = "225"; order[1] = "Petr"; order[2] = "Vasya"; order[3] = "12 may 2013"; order[4] = "tour"; clients formCL = new clients(); clients.dataClients.Rows.Add("1", "Pet", "*****@*****.**", "88-88", "12 may 1990", "true", "VIP"); ClientTypeCol col = new ClientTypeCol(); ClientFactory factCl = new ClientFactory(); managers formMan = new managers(); managers.dataManagers.Rows.Add("1", "Petya", "8888", "Менеджер", "petya"); ManagerTypeCol coll = new ManagerTypeCol(); ManagerFactory factMan = new ManagerFactory(); orders formOrd = new orders(); orders.dataOrders.Rows.Add("Pet", "Petya", "12 may 2015", "1", "tour1"); orders.dataOrders.Rows.Add("Pet", "Petya", "13 may 2014", "2", "tou2"); orders.dataOrders.Rows.Add("Pet", "Petya", "14 may 2014", "3", "tou3"); countries contr = new countries(); countries.dataCountries.Rows.Add("1", "Россия"); Countries_Col obj = new Countries_Col(); hotels hot = new hotels(); hotels.dataHotels.Rows.Add("1", "hotel", "****", "12000"); HotelFactory hotelfac = new HotelFactory(); FoodCol food = new FoodCol(); TransportCol tr = new TransportCol(); TourTypeCol tourtype = new TourTypeCol(); tours formTour = new tours(); tours.dataTours.Rows.Add("1", "tour", "VIP туры", "Россия", "true", "hotel", "Автобус", "BB", "12000", "Рубль"); TourFactory factTour = new TourFactory(); OrderFactory fact = new OrderFactory(); int a = OrderFactory.count(); OrderFactory.AddOrder(order); Assert.AreEqual(a + 1, OrderFactory.count()); }
private void AddTour_Load(object sender, EventArgs e) { for (int i = 0; i < HotelFactory.count(); i++) { comboBox2.Items.Add(HotelFactory.array_Hotels[i]._name); } for (int i = 0; i < TourTypeCol.count(); i++) { comboBox1.Items.Add(TourTypeCol.list[i].Name); } for (int i = 0; i < Countries_Col.count(); i++) { comboBox5.Items.Add(Countries_Col.Coll_of_country[i].Name); } }
public void checkAddTour() { string[] tour = new string[10]; tour[0] = "2"; tour[1] = "tour1"; tour[2] = "VIP туры"; tour[3] = "true"; tour[4] = "hotel"; tour[5] = "Авиа"; tour[6] = "HB"; tour[7] = "35500"; tour[8] = "Доллар"; tour[9] = "Америка"; countries contr = new countries(); countries.dataCountries.Rows.Add("1", "Америка"); Countries_Col obj = new Countries_Col(); hotels hot = new hotels(); hotels.dataHotels.Rows.Add("1", "hotel", "****", "12000"); HotelFactory hotelfac = new HotelFactory(); tours formTour = new tours(); tours.dataTours.Rows.Add("1", "tour", "VIP туры", "Россия", "True", "hotel", "Автобус", "BB", "12000", "Рубль"); FoodCol food = new FoodCol(); TransportCol tr = new TransportCol(); TourTypeCol tourtype = new TourTypeCol(); TourFactory factTour = new TourFactory(); int a = TourFactory.count(); TourFactory.Add_Tour(tour); Assert.AreEqual(a + 1, TourFactory.count()); }