Beispiel #1
0
        public void TestAddTutor()
        {
            var f = new TutorList();

            f.addTutor("ZRob2", "Rob", "*****@*****.**", "1111", "123456789", 3);
            Assert.IsTrue(GlobalItems.checkItemsInDB("users", "fname", "ZRob2"));
        }
Beispiel #2
0
        public void TestAddClass()
        {
            var f = new ClassList();

            f.addClass("Z100", "40", "0", 0, 0);
            Assert.IsTrue(GlobalItems.checkItemsInDB("classes", "name", "Z100"));
        }
Beispiel #3
0
        public void TestAddCourse()
        {
            var f = new CourseList();

            f.addCourse("Test", 10, 50, 0, 0, 0, 0, 0, 0, 0, "Description");
            Assert.IsTrue(GlobalItems.checkItemsInDB("course", "name", "Test"));
        }
Beispiel #4
0
        public void TestAddDepartments()
        {
            var f = new DepartmentList();

            f.addDepartment("Biologia");
            Assert.IsTrue(GlobalItems.checkItemsInDB("departments", "name", "Biologia"));
        }
Beispiel #5
0
        public void TestDeleteTeacher()
        {
            var    f  = new TeacherList();
            string id = GlobalItems.getIdNumber("users", "fname", "ZRob");

            f.deleteTeacher(id);
            Assert.IsFalse(GlobalItems.checkItemsInDB("users", "fname", "ZRob"));
        }
Beispiel #6
0
        public void TestDeleteClass()
        {
            var f  = new ClassList();
            int id = GlobalItems.getKey("classes", "name", "Z100");

            if (id > 0)
            {
                f.deleteClass(id.ToString());
                Assert.IsFalse(GlobalItems.checkItemsInDB("classes", "name", "Z100"));
            }
        }
Beispiel #7
0
        public void TestDeleteCourse()
        {
            var f  = new CourseList();
            int id = GlobalItems.getKey("course", "name", "Test");

            if (id > 0)
            {
                f.DeleteCourse(id.ToString());
                Assert.IsFalse(GlobalItems.checkItemsInDB("course", "name", "Test"));
            }
        }
Beispiel #8
0
        public void TestDeleteDepartments()
        {
            var f  = new DepartmentList();
            int id = GlobalItems.getKey("departments", "name", "Biologia");

            if (id > 0)
            {
                f.delete_department(id.ToString());
                Assert.IsFalse(GlobalItems.checkItemsInDB("departments", "name", "Biologia"));
            }
        }