public void AddAdminToRegistry()
        {
            Admin    admin    = new Admin();
            Register register = new Register(admin);

            register.AddAdminUser("Name", "Password", "Email");

            Assert.AreEqual(register.Users.Count, 1);
            Assert.AreEqual(register.Users[0].MyPrivilege, User.Privilege.admin);
        }
        public void RemoveAdminFromRegistry()
        {
            Admin    temp     = new Admin();
            Register register = new Register(temp);
            Admin    admin    = new Admin("temp", "temp", "temp", User.Privilege.admin);

            register.AddAdminUser(admin);
            register.RemoveAdminUser(admin);

            Assert.AreEqual(register.Users.Count, 0);
        }
        public void LogInTest()
        {
            Admin    temp     = new Admin();
            Register register = new Register(temp);
            Admin    admin    = new Admin("temp", "temp", "password", User.Privilege.admin);

            register.AddAdminUser(admin);
            register.LogIn(admin);

            Assert.AreEqual(admin, register.LoggedUser);
        }
        public void SearchUserWithEmail()
        {
            Admin    temp     = new Admin();
            Register register = new Register(temp);
            Admin    admin    = new Admin("temp", "temp", "password", User.Privilege.admin);
            Teacher  teacher  = new Teacher("temp", "temp2", "password", User.Privilege.teacher);

            register.AddAdminUser(admin);
            register.AddTeacherUser(teacher);

            Assert.AreEqual(register.SearchUserWithEmail("temp"), 0);
        }