public void TestRemovingStudents() { School.ListOfAllStudents.Clear(); var course = new Course("ALALLALALL"); var student = new Student("LALA", "LALA", 10001); course.JoinCourse(student); course.LeaveCourse(student); Assert.AreEqual(0, course.ListOfStudents.Count); }
public void TestCourseLeaveCourse() { const int StartStudentsID = 10000; const int MaxCourseCapacity = 30; const int LastStudentID = StartStudentsID + MaxCourseCapacity; Course course = new Course("Software Engineering"); for (uint id = StartStudentsID; id < LastStudentID; id++) { course.JoinCourse(new Student("Nikolay Kostadinov", id)); } course.LeaveCourse(new Student("Nikolay Kostadinov", 10029)); bool isStudentInCourse = CheckForStudent(new Student("Nikolay Kostadinov", 10029),course); Assert.AreEqual(isStudentInCourse, false, "Leave doesn't work correct"); }
public void TestCourseFullClone() { const int StartStudentsID = 10000; const int MaxCourseCapacity = 30; const int LastStudentID = StartStudentsID + MaxCourseCapacity; Course course = new Course("Software Engineering"); for (uint id = StartStudentsID; id < LastStudentID; id++) { course.JoinCourse(new Student("Nikolay Kostadinov", id)); } course.LeaveCourse(new Student("Nikolay Kostadinov", 10029)); Course cloneCourse = (Course)course.Clone(); bool isEqual = CompareStudents(course, cloneCourse) && (course.Name == cloneCourse.Name); Assert.AreEqual(isEqual, true); }
public void TestCourseLeaveCourseNonPopulated() { Course course = new Course("Software Engineering"); course.LeaveCourse(new Student("Nikolay Kostadinov", 10029)); }
public void TestCourseLeaveCourseZero() { Course course = new Course("Software Engineering"); course.LeaveCourse(null); }
public void TestCourseLeaveCourseNonExistStudent() { Course course = new Course("Software Engineering"); course.JoinCourse(new Student("Nikolay Kostadinov", 10000)); course.LeaveCourse(new Student("Nikolay Kostadinov", 10029)); }