예제 #1
0
        public Mtc(MtcSettings mtcSettings, IQuestionListBuilder questionListBuilder)
        {
            mtcSettings.Should().NotBeNull();
            questionListBuilder.Should().NotBeNull();

            Settings   = mtcSettings;
            _questions = questionListBuilder.BuildQuestions();
            _stats     = new MtcStats(_questions);

            _questionTimer = Settings.SecondsPerQuestions > 0
                ? new Timer(QuestionTimeElapsedHandler, this, -1, Settings.SecondsPerQuestions * 1000)
                : null;

            _testTimer = Settings.SecondsPerTest > 0
                ? new Timer(TestTimeElapsedHandler, this, -1, Settings.SecondsPerTest * 1000)
                : null;
        }
        public MtcQuestionListBuilder(MtcSettings settings)
        {
            settings.Should().NotBeNull();

            Settings = settings;
        }