public void AddStudentMultipleTimeToCourseTest()
        {
            var school = new School();
            var studentIvan = school.RegisterStudent("Ivan");
            var csharpCourse = school.RegisterCourse("C# Part 2");

            school.AddStudentToCourse(studentIvan, csharpCourse);
            school.AddStudentToCourse(studentIvan, csharpCourse);
        }
        static void Main()
        {
            var school = new School();

            var studentIvan = school.RegisterStudent("Ivan");
            Console.WriteLine(studentIvan);

            var studentPeter = school.RegisterStudent("Peter");
            Console.WriteLine(studentPeter);

            var csharpCourse = school.RegisterCourse("C# Fundamentals");
            school.AddStudentToCourse(studentIvan, csharpCourse);
            school.AddStudentToCourse(studentPeter, csharpCourse);

            Console.WriteLine(csharpCourse);
        }
        public void AddNullStudentToCourseTest()
        {
            var school = new School();
            var csharpCourse = school.RegisterCourse("C# Part 2");

            school.AddStudentToCourse(null, csharpCourse);
        }
        public void AddMissingStudentToCourseTest()
        {
            var school = new School();
            var studentIvan = school.RegisterStudent("Ivan");

            var school2 = new School();
            var csharpCourse = school2.RegisterCourse("C# Part 2");

            school2.AddStudentToCourse(studentIvan, csharpCourse);
        }
        public void AddStudentToCourseUnderMaxCapacityTest()
        {
            var school = new School();
            var csharpCourse = school.RegisterCourse("C# Fundamentals");

            for (int i = 0; i < 31; i++)
            {
                var studentIvan = school.RegisterStudent(i.ToString());
                school.AddStudentToCourse(studentIvan, csharpCourse);
            }
        }
        public void AddStudentToCourseTest()
        {
            var school = new School();
            var csharpCourse = school.RegisterCourse("C# Fundamentals");
            var studentIvan = school.RegisterStudent("Ivan");

            school.AddStudentToCourse(studentIvan, csharpCourse);

            Assert.AreEqual(1, csharpCourse.Students.Count);
        }
        public void RemoveStudentFromCourseTest()
        {
            var school = new School();
            var studentIvan = school.RegisterStudent("Ivan");
            var csharpCourse = school.RegisterCourse("C# Part 2");

            school.AddStudentToCourse(studentIvan, csharpCourse);
            school.RemoveStudentFromCourse(studentIvan, csharpCourse);
        }
        public void Add_100_000_StudentsToCourseTest()
        {
            var school = new School();
            var csharpCourse = school.RegisterCourse("C# Part 2");

            for (int i = 0; i < 100001; i++)
            {
                var studentIvan = school.RegisterStudent("Ivan");
                school.AddStudentToCourse(studentIvan, csharpCourse);

                if (csharpCourse.Students.Count == csharpCourse.StudentsCapacity - 1)
                {
                    csharpCourse = school.RegisterCourse(i.ToString()); // Random name
                }
            }
        }