public void T5_adding_teacher_to_student()
        {
            IStudent s = SchoolFactory.CreateStudent("Thibault Cam", 9, DateTime.Parse("21/02/1994"), "IL");
            ITeacher t = SchoolFactory.CreateTeacher("Olivier Spineli", "C#", "IL", DateTime.Parse("21/02/1994"), true);

            Action action = (() => s.AddTeacher(null));

            action.Should().Throw <ArgumentNullException>();

            s.AddTeacher(t);
            s.MainTeacher.Should().NotBeNull();
            s.MainTeacher.Should().BeEquivalentTo(t);
        }
        public void T2_creating_teacher()
        {
            Action action = (() => SchoolFactory.CreateTeacher(null, null, null, DateTime.Now, false));

            action.Should().Throw <ArgumentNullException>();

            Action action1 = (() => SchoolFactory.CreateTeacher(String.Empty, String.Empty, String.Empty, DateTime.Now, false));

            action1.Should().Throw <ArgumentNullException>();

            {
                ITeacher s = SchoolFactory.CreateTeacher("Olivier Spineli", "C#", "IL", DateTime.Parse("21/02/1994"), true);
                s.Name.Should().Be("Olivier Spineli");
                s.Course.Should().Be("C#");
                s.Orentation.Should().Be("IL");
                s.Guid.Should().NotBeEmpty();
                s.Birth.Should().BeSameDateAs(DateTime.Parse("21/02/1994"));
            }
        }
        public void T1_creating_student()
        {
            Action action = (() => SchoolFactory.CreateStudent(null, 0, DateTime.Now, "IL"));

            action.Should().Throw <ArgumentNullException>();

            Action action1 = (() => SchoolFactory.CreateStudent(String.Empty, 0, DateTime.Now, String.Empty));

            action1.Should().Throw <ArgumentNullException>();

            {
                IStudent s = SchoolFactory.CreateStudent("Thibault Cam", 9, DateTime.Parse("21/02/1994"), "IL");
                s.Name.Should().Be("Thibault Cam");
                s.Semestre.Should().Be(9);
                s.Orentation.Should().Be("IL");
                s.Guid.Should().NotBeEmpty();
                s.Birth.Should().BeSameDateAs(DateTime.Parse("21/02/1994"));
            }
        }
        public void T4_creating_classroom_with_valid_capacity(int capacity, bool success)
        {
            Action action = (() => SchoolFactory.CreateClassroom("E07", capacity, true));

            if (success)
            {
                action.Should().NotThrow();
            }
            else
            {
                action.Should().Throw <ArgumentException>();
            }

            {
                IClassroom s = SchoolFactory.CreateClassroom("E07", 10, true);
                s.Guid.Should().NotBeEmpty();
                s.Projector.Should().BeTrue();
                s.Name.Length.Should().BeLessOrEqualTo(3);
                s.Capacity.Should().BeGreaterThan(0);
            }
        }
 public BaseController()
 {
     _schoolFactory = new SchoolFactory();
 }