Exemplo n.º 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));
 }
Exemplo n.º 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));
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public void IncorrectCourseName()
 {
     Course course = new Course("");
 }
Exemplo n.º 5
0
 public void CreateCourse()
 {
     Course course = new Course("lolerskates");
     Assert.AreEqual("lolerskates", course.CourseName);
 }
Exemplo n.º 6
0
 public void AddRepeatingStudentInCourse()
 {
     Course course = new Course("lala");
     course.AddStudent(new Student("lol", 10000));
     course.AddStudent(new Student("lol", 10000));
 }