Ejemplo n.º 1
0
        //Teacher Index
        public ActionResult TeacherIndex(int id)
        {
            var coursName = cService.getCourseByID(id);

            ViewBag.coursName = coursName.name;
            ViewBag.courseID  = id;
            return(View(aService.getAssignmentsInCourse(id)));
        }
Ejemplo n.º 2
0
        public void testGetAssignmentsInCourse()
        {
            // arrange
            const int courseID1 = 2;
            const int courseID2 = 1;
            const int courseID3 = 5;

            // act

            var result1 = _service.getAssignmentsInCourse(courseID1);
            var result2 = _service.getAssignmentsInCourse(courseID2);
            var result3 = _service.getAssignmentsInCourse(courseID3);

            // assert

            Assert.AreEqual(2, result1.assignments.Count);
            Assert.AreEqual(1, result2.assignments.Count);
            Assert.AreEqual(1, result3.assignments.Count);
        }