Пример #1
0
        public Web.Data.Entities.Student Build()
        {
            var student = new Web.Data.Entities.Student
            {
                StudentUSI = _studentUsi,
                FirstName = _firstName,
                LastSurname = _lastName,
                SexTypeId = Sex,
                BirthDate = _birthDate,
                HispanicLatinoEthnicity = HispanicLatinoEthnicity,
            };

            student.StudentRaces.Add(CreateStudentRace());
            student.StudentAddresses.Add(StudentAddressFactory.CreateStudentAddress());
            student.StudentLanguages.Add(StudentLanguageFactory.CreateStudentLanguageWithHomeUse());
            student.StudentAcademicDetails = _studentAcademicDetails;
            student.StudentProgramStatus = _studentProgramStatus;
            student.StudentParentAssociations = _studentParentAssociations;
            student.StudentAssessments = _studentAssessments;
            student.StudentSectionAttendanceEvents = _studentSectionAttendanceEvents;

            student.AttendanceFlags.Add(new AttendanceFlag());
            student.AttendanceFlags.First().FlagCount = _flagCount;

            return student;
        }
Пример #2
0
        public Web.Data.Entities.Student Build()
        {
            var student = new Web.Data.Entities.Student
            {
                StudentUSI              = _studentUsi,
                FirstName               = _firstName,
                LastSurname             = _lastName,
                SexTypeId               = Sex,
                BirthDate               = _birthDate,
                HispanicLatinoEthnicity = HispanicLatinoEthnicity,
            };

            student.StudentRaces.Add(CreateStudentRace());
            student.StudentAddresses.Add(StudentAddressFactory.CreateStudentAddress());
            student.StudentLanguages.Add(StudentLanguageFactory.CreateStudentLanguageWithHomeUse());
            student.StudentAcademicDetails         = _studentAcademicDetails;
            student.StudentProgramStatus           = _studentProgramStatus;
            student.StudentParentAssociations      = _studentParentAssociations;
            student.StudentAssessments             = _studentAssessments;
            student.StudentSectionAttendanceEvents = _studentSectionAttendanceEvents;

            student.AttendanceFlags.Add(new AttendanceFlag());
            student.AttendanceFlags.First().FlagCount = _flagCount;

            return(student);
        }
        public TakeAttendanceModelBuilder WithStudent(Web.Data.Entities.Student student)
        {
            _studentRows.Add(new StudentAttendanceRowModel
            {
                AttendanceType = AttendanceEventCategoryDescriptorEnum.InAttendance,
                StudentUsi     = student.StudentUSI
            });

            return(this);
        }
        private static void StudentParentAssociationShouldBeMapped(Web.Data.Entities.Student student, ProfileModel profileModel)
        {
            var profileParentModel       = profileModel.EditProfileParentModel;
            var studentParentAssociation = student.StudentParentAssociations.First();

            profileParentModel.Relationship.ShouldBe(
                ((RelationTypeEnum)studentParentAssociation.RelationTypeId));

            profileParentModel.SameAddressAsStudent.ShouldBe((bool)studentParentAssociation.LivesWith);
        }
        private static void NativeStudentPropertiesShouldBeMapped(Web.Data.Entities.Student student, ProfileModel profileModel)
        {
            profileModel.StudentUsi.ShouldBe(student.StudentUSI);
            profileModel.StudentName.FirstName.ShouldBe(student.FirstName);
            profileModel.StudentName.LastName.ShouldBe(student.LastSurname);
            profileModel.BiographicalInfo.BirthDate.ShouldBe(student.BirthDate.ToShortDateString());

            var studentRace = student.StudentRaces.First();

            profileModel.BiographicalInfo.Race.ShouldBe((RaceTypeEnum)studentRace.RaceTypeId);
            profileModel.BiographicalInfo.RaceForDisplay.ShouldBe(((RaceTypeEnum)studentRace.RaceTypeId).Humanize());
            profileModel.BiographicalInfo.HispanicLatinoEthnicity.ShouldBe(student.HispanicLatinoEthnicity);
            profileModel.BiographicalInfo.Sex.ShouldBe((SexTypeEnum)student.SexTypeId);

            var studentProfileHomeLanguage = profileModel.BiographicalInfo.HomeLanguage;

            studentProfileHomeLanguage.ShouldBe((LanguageDescriptorEnum)student.StudentLanguages.First().LanguageDescriptorId);
        }
Пример #6
0
        private void Setup()
        {
            _attendanceRepository = Substitute.For <IAttendanceRepository>();
            _attendanceService    = new AttendanceService(_attendanceRepository);

            _student = new StudentBuilder().Build();
            _section = new SectionBuilder().WithStudent(_student).Build();
            _date    = _student.StudentSectionAssociations.First().BeginDate.AddDays(3);

            _attendanceFlags = new List <AttendanceFlag>
            {
                new AttendanceFlag {
                    StudentUSI = new StudentBuilder().WithStudentUsi(1).Build().StudentUSI, FlagCount = 7
                },
                new AttendanceFlag {
                    StudentUSI = new StudentBuilder().WithStudentUsi(2).Build().StudentUSI, FlagCount = 6
                },
                new AttendanceFlag {
                    StudentUSI = new StudentBuilder().WithStudentUsi(3).Build().StudentUSI, FlagCount = 3
                }
            };
        }
 public StudentAssessmentBuilder WithStudent(Web.Data.Entities.Student student)
 {
     _student = student;
     return this;
 }
Пример #8
0
 public SectionBuilder WithStudent(Web.Data.Entities.Student student)
 {
     _students.Add(student);
     return(this);
 }
 public void GoToTheSchedulePage()
 {
     _student      = new StudentBuilder().Build();
     _schedulePage = _homePage.TopMenu.GoToStudentsPage().GoToProfilePage().GoToSchedulePage();
 }
 public ParentCourseGradeBuilder WithStudent(Web.Data.Entities.Student student)
 {
     _student = student;
     _studentUsi = student.StudentUSI;
     return this;
 }
Пример #11
0
 public ParentCourseGradeBuilder WithStudent(Web.Data.Entities.Student student)
 {
     _student    = student;
     _studentUsi = student.StudentUSI;
     return(this);
 }
Пример #12
0
        private void Setup()
        {
            _attendanceRepository = Substitute.For<IAttendanceRepository>();
            _attendanceService = new AttendanceService(_attendanceRepository);

            _student = new StudentBuilder().Build();
            _section = new SectionBuilder().WithStudent(_student).Build();
            _date = _student.StudentSectionAssociations.First().BeginDate.AddDays(3);

            _attendanceFlags = new List<AttendanceFlag>
            {
                new AttendanceFlag{StudentUSI = new StudentBuilder().WithStudentUsi(1).Build().StudentUSI, FlagCount = 7},
                new AttendanceFlag{StudentUSI = new StudentBuilder().WithStudentUsi(2).Build().StudentUSI, FlagCount = 6},
                new AttendanceFlag{StudentUSI = new StudentBuilder().WithStudentUsi(3).Build().StudentUSI, FlagCount = 3}
            };
        }
Пример #13
0
 public SetScheduleModelBuilder WithStudent(Web.Data.Entities.Student student)
 {
     _studentName = String.Join(" ", student.FirstName, student.LastSurname);
     _studentUsi  = student.StudentUSI;
     return(this);
 }
Пример #14
0
 public StudentAssessmentBuilder WithStudent(Web.Data.Entities.Student student)
 {
     _student = student;
     return(this);
 }
Пример #15
0
 public StudentSectionAttendanceEventBuilder WithStudent(Web.Data.Entities.Student student)
 {
     _student = student;
     return(this);
 }
Пример #16
0
 public void GoToTheSchedulePage()
 {
     _student = new StudentBuilder().Build();
     _schedulePage = _homePage.TopMenu.GoToStudentsPage().GoToProfilePage().GoToSchedulePage();
 }
 public StudentSectionAttendanceEventBuilder WithStudent(Web.Data.Entities.Student student)
 {
     _student = student;
     return this;
 }