예제 #1
0
파일: CourseTest.cs 프로젝트: vassil/CSharp
        public void CourseList_ThrowException_StudentAlreadyExists()
        {
            Course course = new Course("Math");

            int uniqueID = 11111;

            Student student = new Student("Ivan", uniqueID);
            Student student2 = new Student("Georgi", uniqueID);

            course.AddStudent(student);
            course.AddStudent(student2);
        }
예제 #2
0
파일: CourseTest.cs 프로젝트: vassil/CSharp
        public void CourseList_ThrowException_MoreThan30Students()
        {
            Course course = new Course("Math");

            Random uniqueID = new Random();

            for (int i = 0; i < 50; i++)
            {
                Student student = new Student("Ivan", uniqueID.Next(10000, 99999));
                course.AddStudent(student);
            }
        }