public void SqlEnrollmentRepository_UnEnroll_a_Enrolled_Student() { IEnrollmentRepository repository = new SqlEnrollmentRepository(); // First enroll a student // var courseEnrollment = new CourseEnrollment { CourseOfferingNo = 0, StudentId = -121, GradeNo = 1, StatusId = 1, ImportDate = DateTime.Now, ImportConversion = "Student Portal" }; int isEnrolled = repository.EnrollStudent(courseEnrollment); Assert.AreEqual(1, isEnrolled); // Then Un-Enroll that student // var isUnEnrolled = repository.UnEnrollStudent(courseEnrollment.StudentId, courseEnrollment.CourseOfferingNo); Assert.IsTrue(isUnEnrolled); }
public void SqlEnrollmentRepository_Enrolls_Student_in_a_Class_Offered_in_a_Term() { IEnrollmentRepository repository = new SqlEnrollmentRepository(); var courseEnrollment = new CourseEnrollment { CourseOfferingNo = 0, StudentId = -1, GradeNo = 1, StatusId = 1, ImportDate = DateTime.Now, ImportConversion = "Student Portal" }; int isEnrolled = repository.EnrollStudent(courseEnrollment); Assert.AreEqual(1, isEnrolled); }