public void EnrollmentUpdatePostTest() { try { var enrollmentController = new EnrollmentController(); var enrollment = enrollmentController.GetEnrollmentInfo("A000002", 102); Assert.AreEqual("A000002", enrollment[0].StudentId); Assert.AreEqual(102, enrollment[0].ScheduleId); Assert.AreEqual("A", enrollment[0].Grade); enrollmentController.UpdateEnrollment(new Enrollment { StudentId = "A000002", ScheduleId = 102, Grade = "B-" }); enrollment = enrollmentController.GetEnrollmentInfo("A000002", 102); Assert.AreEqual("A000002", enrollment[0].StudentId); Assert.AreEqual(102, enrollment[0].ScheduleId); Assert.AreEqual("B-", enrollment[0].Grade); enrollmentController.UpdateEnrollment(new Enrollment { StudentId = "A000002", ScheduleId = 102, Grade = "A" }); enrollment = enrollmentController.GetEnrollmentInfo("A000002", 102); Assert.AreEqual("A000002", enrollment[0].StudentId); Assert.AreEqual(102, enrollment[0].ScheduleId); Assert.AreEqual("A", enrollment[0].Grade); } catch { throw; } }