예제 #1
0
        public void checkAddManager()
        {
            //new manager
            string[] manager = new string[5];
            manager[0] = "125";
            manager[1] = "John";
            manager[2] = "893-88";
            manager[3] = "Генеральный директор";
            manager[4] = "user";

            //create form with table
            managers form = new managers();

            //add 3 records
            managers.dataManagers.Rows.Add("1", "Petya", "8888", "Менеджер", "petya");
            managers.dataManagers.Rows.Add("2", "Vasya", "6666", "Менеджер", "vas");
            managers.dataManagers.Rows.Add("3", "Egor", "3333", "Менеджер", "egor");

            ManagerTypeCol coll = new ManagerTypeCol();
            ManagerFactory fact = new ManagerFactory();
            int            a    = ManagerFactory.count();

            ManagerFactory.AddNewManager(manager);
            Assert.AreEqual(a + 1, ManagerFactory.count());
        }