Esempio n. 1
0
        public void testRemoveCourse()
        {
            var controller = CreateModifyRequirementsControllerAs("*****@*****.**");
            var degree     = _reqContext.Find <Degree>("CSAI");
            int numCourses = degree.Courses.Count;

            foreach (CourseGroup cg in degree.CourseGroups)
            {
                numCourses += cg.Courses.Count;
            }

            controller.Remove("CSAI", "CSDS440");

            int resultNumCourses = degree.Courses.Count;

            foreach (CourseGroup cg in degree.CourseGroups)
            {
                resultNumCourses += cg.Courses.Count;
            }

            Assert.IsTrue(numCourses == resultNumCourses + 1);
        }
Esempio n. 2
0
        public IActionResult Edit(string DegreeID)
        {
            var degree = _requirementsContext.Find <Degree>(DegreeID);

            return(View("Modify", degree));
        }