Exemplo n.º 1
0
        public void Courses_CanLeaveCorrectly()
        {
            var course          = new Course();
            var initialStudents = course.Count;
            var studentToLeave  = new Student("Ivan");

            course.studentJoins(studentToLeave);

            Assert.AreEqual(initialStudents, course.Count - 1);
        }
Exemplo n.º 2
0
        public void Course_ShouldThrowAnApplicationExceptionWhenNumberOfSigned_StudentsExceedsTheLimit()
        {
            Course testCourse = new Course();

            for (int i = 0; i <= 30; i++)
            {
                Student testStudent = new Student("Ivan");
                testCourse.studentJoins(testStudent);
            }
        }
Exemplo n.º 3
0
        public void Courses_CanAddCorrectly()
        {
            var course          = new Course();
            var initialStudents = course.Count;
            var studentToAdd    = new Student("Ivan");

            course.studentJoins(studentToAdd);

            Assert.AreEqual(initialStudents + 1, course.Count);
        }