Exemplo n.º 1
0
 public void StudentShouldNotThrowWhenLeavingCourse()
 {
     var course = new Course("testCourse");
     var st = new Student("Pesho", 15000);
     st.JoinCourse(course);
     st.LeaveCourse(course);
 }
Exemplo n.º 2
0
 public void CourseShouldRemoveStudent()
 {
     var course = new Course("Maths");
     var student = new Student("unnamed", Student.MinValidId);
     student.JoinCourse(course);
     Assert.AreEqual(1, course.Students.Count);
     student.LeaveCourse(course);
     Assert.AreEqual(0, course.Students.Count);
 }
Exemplo n.º 3
0
        public void StudentProperlyLeavesCourse()
        {
            var student = new Student("pesho", 22222);
            var course = new Course("math");
            student.JoinCourse(course);
            student.LeaveCourse(course);

            Assert.IsFalse(course.Students.Contains(student), "Student is still in the course");
        }
Exemplo n.º 4
0
 public void TestLeaveCourseMethodShouldWorkProperly()
 {
     var testCourse = new Course("testCourseName");
     var testStudent = new Student(10001, "Test Student Name");
     testStudent.AttendCourse(testCourse);
     testStudent.LeaveCourse(testCourse);
     Assert.IsTrue(
         testCourse.Students.Count == 0,
         "Students list count is not equal to zero"
         );
 }
        public void Course_LeavingCourse()
        {
            School mySchool = new School();
            Course art = new Course();

            for (int i = 1; i <= 15; i++)
            {
                Student student = new Student("Ivan Ivanov", i + 10000, mySchool);
                student.JoinCourse(art);
                student.LeaveCourse(art);
            }

            Assert.IsTrue(art.Members.Count == 0);
        }
Exemplo n.º 6
0
 public void CanNotAddNullStudents()
 {
     var student = new Student("pesho", 22222);
     student.LeaveCourse(null);
 }
Exemplo n.º 7
0
 public void StudentSHouldThrowWhenLeavingNullCourse()
 {
     var st = new Student("Pesho", 15000);
     st.LeaveCourse(null);
 }
Exemplo n.º 8
0
 public void CourseShouldThrowIfStudentToRemoveDoesNotExist()
 {
     var course = new Course("Maths");
     var student = new Student("unnamed", Student.MinValidId);
     student.LeaveCourse(course);
 }
Exemplo n.º 9
0
 public void StudentCanNotLeaveNullCourse()
 {
     var student = new Student("pesho", 22222);
     student.LeaveCourse(null);
 }