public void School_AddNewCourse() { var school = new School(); var course = new Course("Math"); school.AddCourse(course); bool isCourseAdded = school.CheckIfCourseExists(course); Assert.IsTrue(isCourseAdded); }
public void Course_DeletingPresentStudent() { var course = new Course("Math"); var student = new Student("Pesho", 19834); course.AddStudent(student); course.RemoveStudent(student); bool studentIsRemoved = course.CheckIfStudentExists(student); Assert.IsFalse(studentIsRemoved); }
public void Course_CreatingCourseWithExtraStudents() { var course = new Course("Math"); for (int i = 1; i < 50; i++) { var student = new Student(i.ToString(), 10000 + i); course.AddStudent(student); } }
public bool CheckIfCourseExists(Course subject) { bool isCourseExists = false; foreach (var course in Courses) { if (subject.CourseName == course.CourseName) { isCourseExists = true; break; } } return isCourseExists; }
public void AddCourse(Course course) { Courses.Add(course); }
public void Course_DeletingNonPresentStudent() { var course = new Course("Math"); var student = new Student("Pesho", 19872); course.RemoveStudent(student); }
public void Course_CreatingCourse() { var course = new Course("Math"); var isCreateadCorrect = course is Course; Assert.IsTrue(isCreateadCorrect); }