示例#1
0
 public void RemoveStudentInCourse()
 {
     Course course = new Course("lala");
     course.AddStudent(new Student("lol", 10000));
     course.RemoveStudentByUID(10000);
     course.AddStudent(new Student("lol", 10000));
 }
示例#2
0
 public void MoreThan30Students()
 {
     Course course = new Course("lala");
     for (int i = 0; i < 35; i++)
     {
         course.AddStudent(new Student(i.ToString(), 10000 + i));
     }
 }
示例#3
0
        public void AddCourse(Course course)
        {
            string courseName = course.CourseName;
            foreach (var item in courses)
            {
                if (item.CourseName == courseName)
                {
                    throw new ArgumentException("Course names cannot duplicate.");
                }
            }

            courses.Add(course);
        }
示例#4
0
 public void IncorrectCourseName()
 {
     Course course = new Course("");
 }
示例#5
0
 public void CreateCourse()
 {
     Course course = new Course("lolerskates");
     Assert.AreEqual("lolerskates", course.CourseName);
 }
示例#6
0
 public void AddRepeatingStudentInCourse()
 {
     Course course = new Course("lala");
     course.AddStudent(new Student("lol", 10000));
     course.AddStudent(new Student("lol", 10000));
 }