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); }
public IActionResult Edit(string DegreeID) { var degree = _requirementsContext.Find <Degree>(DegreeID); return(View("Modify", degree)); }