Example #1
0
 def setUp(self):
     TestCase.setUp(self)
     self.controller = ControllerStudent(Repository(), ValidatorStudent(),
                                         UndoController())
     # put here test logic
     self.controller.add_student(1, "A", 1)
     self.controller.add_student(2, "B", 2)
     self.controller.add_student(3, "C", 3)
Example #2
0
 def setUp(self):
     TestCase.setUp(self)
     self.controller = ControllerAssignment(Repository(), ValidatorAssign(),
                                            UndoController())
     # put here test logic
     self.controller.add_assignment(1, "ASC", "May")
     self.controller.add_assignment(2, "FP", "March")
     self.controller.add_assignment(3, "Logic", "April")
Example #3
0
 def setUp(self):
     TestCase.setUp(self)
     self.controller = ControllerGrade(Repository(), Repository(),
                                       Repository(), ValidatorGrade(),
                                       UndoController())
     # put here test logic
     self.controller.add_grade(1, 1, 1, 9)
     self.controller.add_grade(2, 1, 2, 4)
     self.controller.add_grade(3, 1, 3, 3)
Example #4
0
def main():
    student_repo = RepoWritingFileStudent()
    assign_repo = RepoWritingFileAssign()
    grade_repo = RepoWritingFileGrade(student_repo, assign_repo)
    validator_student = ValidatorStudent()
    validator_assign = ValidatorAssign()
    validator_grade = ValidatorGrade()
    controller_undo_redo = UndoController()
    controller_student = ControllerStudent(student_repo, validator_student,
                                           controller_undo_redo)
    controller_assignment = ControllerAssignment(assign_repo, validator_assign,
                                                 controller_undo_redo)
    controller_grade = ControllerGrade(student_repo, assign_repo, grade_repo,
                                       validator_grade, controller_undo_redo)
    console = Console(controller_student, controller_assignment,
                      controller_grade, controller_undo_redo)
    console.pre_run()