Esempio n. 1
0
 def setUp(self):
     assignment_repo = Repository()
     grade_repo = Repository()
     assignment_validator = Assignment_Validator()
     self._undo_service = UndoService()
     self._assignment_list = assignmentService(assignment_repo, grade_repo, assignment_validator,self._undo_service)
     self._assignment_repo = Repository()
Esempio n. 2
0
    def setUp(self):

        student_repo = Repository()
        assignment_repo = Repository()
        grade_repo = Repository()
        student_validator = Student_Validator()
        assignment_validator = Assignment_Validator()
        grade_validator = Grade_Validator()
        self._undo_service = UndoService()

        student_service = studentService(student_repo, grade_repo, student_validator, self._undo_service )
        assignment_service = assignmentService(assignment_repo, grade_repo, assignment_validator, self._undo_service)
        grade_service = gradeService(student_repo, assignment_repo, grade_repo, student_validator, assignment_validator,grade_validator, self._undo_service)

        student_validator = Student_Validator()
        assignment_validator = Assignment_Validator()
        grade_validator = Grade_Validator()

        self._student_list = student_service
        self._assignment_list = assignment_service
        self._grade_list = grade_service
        self.list_s.add_student('124', 'Mark Park', '912')
        self.list_s.add_student('125', 'Mark Park', '912')
        self.list_s.add_student('126', 'Mark Park', '912')
        self.list_s.add_student('127', 'Mark Park', '913')
        self.list_s.add_student('128', 'Mark Park', '914')
        self.assing_list.add_assignment('124', 'Homework due Tomorrow', '2021-12-22')
        self.assing_list.add_assignment('125', 'Homework due Tomorrow', '2021-12-22')
        self.assing_list.add_assignment('126', 'Homework due Tomorrow', '2021-12-22')
        self.assing_list.list_of_assignments.add_object(Assignment('127', 'Homework due Tomorrow', '2020-10-22'))
Esempio n. 3
0
    def setUp(self):
        student_repo = Repository()
        assignment_repo = Repository()
        grade_repo = Repository()
        student_validator = Student_Validator()
        assignment_validator = Assignment_Validator()
        grade_validator = Grade_Validator()
        undo_service = UndoService()
        self._undo_service = undo_service
        student_service = studentService(student_repo, grade_repo, student_validator, self._undo_service )
        assignment_service = assignmentService(assignment_repo, grade_repo, assignment_validator, self._undo_service)
        grade_service = gradeService(student_repo, assignment_repo, grade_repo, student_validator, assignment_validator,grade_validator, self._undo_service)

        self._grades_list = grade_service
        self._assignments = assignment_service
        self._student_list = student_service
Esempio n. 4
0
            raise RepositoryException(
                "Fatal Warning!... No repository initialized!\n")
    except RepositoryException as ve:
        print(str(ve))
        exit(0)

    # we now initialize the validators and so on
    student_validator = Student_Validator()
    assignment_validator = Assignment_Validator()
    grade_validator = Grade_Validator()

    undo_service = UndoService()

    student_service = studentService(student_repo, grade_repo,
                                     student_validator, undo_service)
    assignment_service = assignmentService(assignment_repo, grade_repo,
                                           assignment_validator, undo_service)
    grade_service = gradeService(student_repo, assignment_repo, grade_repo,
                                 student_validator, assignment_validator,
                                 grade_validator, undo_service)

    # we add random data if we use the inmemory storing method
    if repoSetUp.get_mode == "inmemory":
        number = generateRandom(student_service, assignment_service,
                                grade_service)
        number.generate_random_student()
        number.generate_random_assignment()
        number.generate_random_grades()

    if repoSetUp.get_uimode == "gui":
        gui = GUI(student_service, assignment_service, grade_service,
                  undo_service)