public void ShouldMap() { var student = new StudentBuilder().Build(); var takeAttendanceModel = new TakeAttendanceModelBuilder().WithStudent(student).Build(); var section = new SectionBuilder().WithStudent(student).Build(); var mapper = new TakeAttendanceModelToStudentSectionAttendanceEventListMapper(); var studentSectionAttendanceEventList = mapper.Build(takeAttendanceModel, section).ToList(); studentSectionAttendanceEventList.First().StudentUSI.ShouldBe(student.StudentUSI); studentSectionAttendanceEventList.First().Student.ShouldBe(student); }
public AttendanceController(IGenericRepository genericRepository, ISectionRepository sectionRepository, SectionToTakeAttendanceModelMapper sectionToTakeAttendanceModelMapper, TakeAttendanceModelToStudentSectionAttendanceEventListMapper takeAttendanceModelToStudentSectionAttendanceEventListMapper, IAttendanceService attendanceService, IStudentRepository studentRepository) { _genericRepository = genericRepository; _sectionRepository = sectionRepository; _sectionToTakeAttendanceModelMapper = sectionToTakeAttendanceModelMapper; _takeAttendanceModelToStudentSectionAttendanceEventListMapper = takeAttendanceModelToStudentSectionAttendanceEventListMapper; _attendanceService = attendanceService; _studentRepository = studentRepository; }