//classId
        public GradeBook Get(int id)
        {
            var gradeBook = new GradeBook();
            var _gradeBookRepository = new GradeBookRepository();
            var _teacherRepository = new TeacherRepository();
            var _rosterRepository = new RosterRepository();

            gradeBook.StudentsEnrolled = _rosterRepository.GetStudentsEnrolledIn(id);
            gradeBook.Course = _teacherRepository.GetCourseById(id);
            gradeBook.AssignmentList = _gradeBookRepository.GetListOfAssignmentsById(id);
            gradeBook.StudentPerformances = _gradeBookRepository.GetListOfStudentPerformanceById(gradeBook.StudentsEnrolled);
            return gradeBook;
        }
Ejemplo n.º 2
0
        public void CreateClassTest()
        {
            TeacherRepository repo = new TeacherRepository();
            var newCourse = new Course
            {
                UserId = "6d8bfd69-9321-4847-9633-5d7214c97f68",
                Description = "Unit Tested Class",
                StartDate = new DateTime(2014, 6, 15),
                EndDate = new DateTime(2014, 9, 15),
                GradeLevel = 5,
                IsArchived = false,
                Name = "Unit testing 101",
                Subject = "Programming"
            };

            repo.CreateCourse(newCourse);

            Assert.AreNotEqual(0, newCourse.ClassId);
        }