예제 #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));
 }