Example #1
0
File: Tests.py Project: VicSera/UBB
    def test_add_student__unique_id__exception(self):
        repository = Repository()
        student_service = StudentService(repository)

        student_service.add_student(1, 'Vic Sera', 10, 10)
        self.assertRaises(ValidationError, student_service.add_student, 1,
                          'This Will Crash', 10, 10)
Example #2
0
File: Tests.py Project: VicSera/UBB
    def test_add_student__valid_name__no_exception(self):
        repository = Repository()
        student_service = StudentService(repository)

        student_service.add_student(1, 'Qwe Rty', 10, 10)
        self.assertEqual(1, len(repository.get_all_students()))