Esempio n. 1
0
 public void Setup()
 {
     this.grade            = GradeTestUtils.GetInitialStateGrade();
     this.gradeDto         = GradeTestUtils.GetInitialGradeDto(grade.Id);
     this.gradeCreationDto = GradeTestUtils.GetGradeCreationDto();
     this.gradeEditingDto  = GradeTestUtils.GetGradeEditingDto();
     this.gradeMapper      = new GradeMapper();
 }
Esempio n. 2
0
 public GradeService(IReadRepository readRepository, IWriteRepository writeRepository,
                     IGradeMapper gradeMapper, IStudentService studentService, IExamService examService, IEmailService emailService)
 {
     this.readRepository  = readRepository;
     this.writeRepository = writeRepository;
     this.gradeMapper     = gradeMapper;
     this.studentService  = studentService;
     this.examService     = examService;
     this.emailService    = emailService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GradeController"/> class.
 /// </summary>
 /// <param name="logger">Logs errors and information.</param>
 /// <param name="telemetryClient">The Application Insights telemetry client.</param>
 /// <param name="unitOfWork">Grade repository for working with grade data.</param>
 /// <param name="gradeMapper">The instance of grade mapper class to work with models.</param>
 /// <param name="usersService">Instance of user service to get user data.</param>
 public GradeController(
     ILogger <GradeController> logger,
     TelemetryClient telemetryClient,
     IUnitOfWork unitOfWork,
     IGradeMapper gradeMapper,
     IUsersService usersService)
     : base(telemetryClient)
 {
     this.logger       = logger;
     this.unitOfWork   = unitOfWork;
     this.gradeMapper  = gradeMapper;
     this.usersService = usersService;
 }
Esempio n. 4
0
 public ExamService(IReadRepository readRepository, IWriteRepository writeRepository,
                    IExamMapper examMapper,
                    ICourseService courseService,
                    IStudentCourseService studentCourseService,
                    IStudentService studentService,
                    IClassroomAllocationService classroomAllocationService,
                    IClassroomAllocationMapper classroomAllocationMapper,
                    IGradeMapper gradeMapper,
                    IStudentMapper studentMapper,
                    IEmailService emailService)
 {
     this.writeRepository            = writeRepository ?? throw new ArgumentNullException();
     this.readRepository             = readRepository ?? throw new ArgumentNullException();
     this.examMapper                 = examMapper ?? throw new ArgumentNullException();
     this.courseService              = courseService ?? throw new ArgumentNullException();
     this.classroomAllocationMapper  = classroomAllocationMapper ?? throw new ArgumentNullException();
     this.classroomAllocationService = classroomAllocationService ?? throw new ArgumentNullException();
     this.studentCourseService       = studentCourseService ?? throw new ArgumentNullException();
     this.studentService             = studentService ?? throw new ArgumentNullException();
     this.gradeMapper                = gradeMapper ?? throw new ArgumentNullException();
     this.studentMapper              = studentMapper ?? throw new ArgumentNullException();
     this.emailService               = emailService ?? throw new ArgumentNullException();
 }