Пример #1
0
        public void TestFactory()
        {
            FactoryControllers fc = new FactoryControllers();

            ExamController ExamC = (ExamController)fc.CreateController(ControllersFormat.Exam);

            int count = ExamC.Create(new Exam("History", 0));

            bool actual = false, expected = true;

            if (count > 0)
            {
                actual = true;
            }

            Assert.AreEqual(actual, expected);
        }
Пример #2
0
        public StatisticSession()
        {
            fc = new FactoryControllers();

            resultController
                = (ResultController)fc.CreateController(ControllersFormat.Result);

            studentController
                = (StudentController)fc.CreateController(ControllersFormat.Student);

            scheduleController
                = (ScheduleController)fc.CreateController(ControllersFormat.Schedule);

            teamController
                = (TeamController)fc.CreateController(ControllersFormat.Team);

            examController
                = (ExamController)fc.CreateController(ControllersFormat.Exam);

            teacherController
                = (TeacherController)fc.CreateController(ControllersFormat.Teacher);
        }