예제 #1
0
 public ScheduleController(IGenericRepository genericRepository,
     IStudentSectionRepository studentSectionRepository,
     IAssessmentSectionRepository assessmentSectionRepository,
     ProfilePhotoUrlFetcher profilePhotoUrlFetcher, 
     IMapper<Session, SessionListItemModel> sessionToSessionListItemModelMapper,
     IMapper<Section, AutocompleteModel> sectionToAutocompleteModelMapper,
     IMapper<StudentSectionAssociation, SectionListItemModel> studentSectionAssociationToSectionListItemModelMapper, 
     IMapper<SetModel, StudentSectionAssociation> setModelToStudentSectionAssociationMapper, 
     IStudentSectionAttendanceRepository studentSectionAttendanceRepositoryRepository)
 {
     _genericRepository = genericRepository;
     _studentSectionRepository = studentSectionRepository;
     _assessmentSectionRepository = assessmentSectionRepository;
     _profilePhotoUrlFetcher = profilePhotoUrlFetcher;
     _sessionToSessionListItemModelMapper = sessionToSessionListItemModelMapper;
     _sectionToAutocompleteModelMapper = sectionToAutocompleteModelMapper;
     _studentSectionAssociationToSectionListItemModelMapper = studentSectionAssociationToSectionListItemModelMapper;
     _setModelToStudentSectionAssociationMapper = setModelToStudentSectionAssociationMapper;
     _studentSectionAttendanceRepositoryRepository = studentSectionAttendanceRepositoryRepository;
 }
예제 #2
0
        public AssessmentController(IMapper<CreateModel, Assessment> createModelToAssessmentMapper,
            IGenericRepository genericRepository,
            IAssessmentRepository assessmentRepository,
            StudentAssessmentsToAssessmentResultModelMapper studentAssessmentsToAssessmentResultModelMapper,
            IMapper<Assessment, EnterResultsModel> assessmentToEnterResultsModelMapper,
            EnterResultsStudentModelToStudentAssessmentMapper enterResultsStudentModelToStudentAssessmentMapper,
			IMapper<Assessment, IndexModel> assessmentToAssessmentIndexModelMapper,
            ProfilePhotoUrlFetcher profilePhotoUrlFetcher, ILearningStandardRepository learningStandardRepository, ISessionFilter sessionFilter)
        {
            _createModelToAssessmentMapper = createModelToAssessmentMapper;
            _genericRepository = genericRepository;
            _assessmentRepository = assessmentRepository;
            _studentAssessmentsToAssessmentResultModelMapper = studentAssessmentsToAssessmentResultModelMapper;
            _assessmentToEnterResultsModelMapper = assessmentToEnterResultsModelMapper;
            _enterResultsStudentModelToStudentAssessmentMapper = enterResultsStudentModelToStudentAssessmentMapper;
            _profilePhotoUrlFetcher = profilePhotoUrlFetcher;
             _learningStandardRepository = learningStandardRepository;
            _sessionFilter = sessionFilter;
            _assessmentToAssessmentIndexModelMapper = assessmentToAssessmentIndexModelMapper;
        }
        private void Setup()
        {
            var studentAssessmentToEnterResultsStudentModelMapper =
                Substitute.For<IMapper<StudentAssessment, EnterResultsStudentModel>>();
            studentAssessmentToEnterResultsStudentModelMapper.Build(Arg.Any<StudentAssessment>())
                .Returns(new EnterResultsStudentModel());

            var downloader = Substitute.For<IFileDownloader>();
            _profilePhotoUrlFetcher = Substitute.For<ProfilePhotoUrlFetcher>(downloader);
            _mapper = new AssessmentToEnterResultsModelMapper(studentAssessmentToEnterResultsStudentModelMapper, _profilePhotoUrlFetcher);

            _profilePhotoUrlFetcher.GetProfilePhotoThumbnailUrlOrDefault(Arg.Any<Int32>()).Returns("/Assets/Images/placeholder.png");

            _entity = new AssessmentBuilder()
                .WithAssessmentLearningStandards()
                .WithAssessmentPerformanceLevels()
                .Build();

            Web.Data.Entities.Student student1 = new StudentBuilder().Build();
            Web.Data.Entities.Student student2 = new StudentBuilder().Build();

            _section = new SectionBuilder().WithStudent(student1).WithStudent(student2).WithAssessment(_entity).Build();
            _assessmentSection = _section.AssessmentSections.First();
        }
 private void Setup()
 {
     var downloader = Substitute.For<IFileDownloader>();
     _profilePhotoUrlFetcher = Substitute.For<ProfilePhotoUrlFetcher>(downloader);
     _profilePhotoUrlFetcher.GetProfilePhotoThumbnailUrlOrDefault(Arg.Any<Int32>()).Returns("/Assets/Images/placeholder.png");
 }
 public SectionToTakeAttendanceModelMapper(ProfilePhotoUrlFetcher profilePhotoUrlFetcher)
 {
     _profilePhotoUrlFetcher = profilePhotoUrlFetcher;
 }