public void JoinToCourse_ExceptionAddMoreFrom30Students() { School telerikAcademy = new School(); Student nakov = new Student("Svetlin Nakov", 12345, telerikAcademy); Course html = new Course(); for (int i = 0; i < 31; i++) { html.JoinToCourse(nakov); } }
public void JoinToCourse_AddThreeStudents() { School telerikAcademy = new School(); Student nakov = new Student("Svetlin Nakov", 12345, telerikAcademy); Student doncho = new Student("Doncho Minkov", 23456, telerikAcademy); Student niki = new Student("Nikolay Kostov", 34567, telerikAcademy); Course oop = new Course(); oop.JoinToCourse(nakov); oop.JoinToCourse(doncho); oop.JoinToCourse(niki); Assert.AreEqual(3, oop.CourseStudents.Count, "Wrong number of students in studentsList"); }
public void LeaveCourse_TestAddThreeStudentsAndLeaveOne() { School telerikAcademy = new School(); Student nakov = new Student("Svetlin Nakov", 12345, telerikAcademy); Student doncho = new Student("Doncho Minkov", 23456, telerikAcademy); Student niki = new Student("Nikolay Kostov", 34567, telerikAcademy); Course qpc = new Course(); qpc.JoinToCourse(nakov); qpc.JoinToCourse(doncho); qpc.JoinToCourse(niki); qpc.LeaveCourse(nakov); Assert.AreEqual(2, qpc.CourseStudents.Count, "Wrong number of students in studentsList"); }