Exemplo n.º 1
0
        public void checkAddTour()
        {
            string[] goods = new string[10];
            goods[0] = "2";
            goods[1] = "goods";
            goods[2] = "Type ";
            goods[3] = "35500";
            goods[4] = "Доллар";

            TypeGoodsForm contr = new TypeGoodsForm();

            TypeGoodsForm.dataTypeGoods.Rows.Add("1", "Саморез");
            TypeGoodsCol obj = new TypeGoodsCol();

            GoodsForm formTour = new GoodsForm();

            GoodsForm.dataGoods.Rows.Add("1", "goods", "VIP туры", "12000", "Рубль");

            GoodsTypeCol tourtype = new GoodsTypeCol();

            GoodFactory factTour = new GoodFactory();
            int         a        = GoodFactory.count();

            GoodFactory.Add_Goods(goods);
            Assert.AreEqual(a + 1, GoodFactory.count());
        }
Exemplo n.º 2
0
        public void checkAddOrder()
        {
            string[] order = new string[5];
            order[0] = "225";
            order[1] = "Petr";
            order[2] = "Vasya";
            order[3] = "12 may 2013";
            order[4] = "goods";

            Clients formCL = new Clients();

            Clients.dataClients.Rows.Add("1", "Pet", "*****@*****.**", "88-88", "12 may 1990", "VIP");
            ClientTypeCol col    = new ClientTypeCol();
            ClientFactory factCl = new ClientFactory();

            managers formMan = new managers();

            managers.dataManagers.Rows.Add("1", "Petya", "8888", "Менеджер", "petya", " 22 мая");
            ManagerTypeCol coll    = new ManagerTypeCol();
            ManagerFactory factMan = new ManagerFactory();

            OrdersForm formOrd = new OrdersForm();

            OrdersForm.dataOrders.Rows.Add("Pet", "Petya", "12 may 2015", "1", "Goods1");
            OrdersForm.dataOrders.Rows.Add("Pet", "Petya", "13 may 2014", "2", "Goods2");
            OrdersForm.dataOrders.Rows.Add("Pet", "Petya", "14 may 2014", "3", "Goods3");

            TypeGoodsForm type = new TypeGoodsForm();

            TypeGoodsForm.dataTypeGoods.Rows.Add("1", "Саморез");
            TypeGoodsCol obj = new TypeGoodsCol();

            GoodsTypeCol goodstype = new GoodsTypeCol();

            GoodsForm formGoods = new GoodsForm();

            GoodsForm.dataGoods.Rows.Add("1", "goods", "type", "12000", "Рубль");
            GoodFactory  factTour = new GoodFactory();
            OrderFactory fact     = new OrderFactory();
            int          a        = OrderFactory.count();

            OrderFactory.AddOrder(order);
            Assert.AreEqual(a + 1, OrderFactory.count());
        }
Exemplo n.º 3
0
        public void checkDelTour()
        {
            TypeGoodsForm contr = new TypeGoodsForm();

            TypeGoodsForm.dataTypeGoods.Rows.Add("1", "Саморез");
            TypeGoodsCol obj = new TypeGoodsCol();

            GoodsForm formTour = new GoodsForm();

            GoodsForm.dataGoods.Rows.Add("1", "goods", "Type", "12000", "Рубль");
            GoodsForm.dataGoods.Rows.Add("2", "goods", "Type", "12000", "Рубль");
            GoodsForm.dataGoods.Rows.Add("3", "goods", "Type", "12000", "Рубль");

            GoodsTypeCol tourtype = new GoodsTypeCol();

            GoodFactory factTour = new GoodFactory();
            int         a        = GoodFactory.count();

            GoodFactory.DeleteGoods(1);
            Assert.AreEqual(a - 1, GoodFactory.count());
        }