Example #1
0
        /// <summary>
        /// Задает коллекцию вопросов.
        /// </summary>
        /// <param name="id">Идентификатор пользователя.</param>
        /// <param name="user">Имя пользователя.</param>
        /// <param name="command">Команда с типом вопросов.</param>
        private void SetQuestions(int id, string user, string command)
        {
            _subStates[id] = new UserTestState
            {
                User     = user,
                Results  = new List <bool>(),
                SubState = StateChoice
            };

            switch (command)
            {
            case ConclusiveRoleMember:
            {
                _subStates[id].TasksInfos = _tasksStorage.GetTasksForConclusiveMembers(QuestionsNumbers)
                                            .Select(c => _tasksProcessing.Shake(c)).ToList();

                break;
            }

            case ConsultativeRoleMember:
            {
                _subStates[id].TasksInfos = _tasksStorage.GetTasksForConsultativeMembers(QuestionsNumbers)
                                            .Select(c => _tasksProcessing.Shake(c)).ToList();


                break;
            }

            case Observer:
            {
                _subStates[id].TasksInfos = _tasksStorage.GetTasksForObservers(QuestionsNumbers)
                                            .Select(c => _tasksProcessing.Shake(c)).ToList();

                break;
            }
            }
        }
Example #2
0
        public void InputCountGreatThanArrayCount()
        {
            var tasks = _tasksStorage.GetTasksForConclusiveMembers(int.MaxValue).ToList();

            Assert.That(tasks.Count, Is.EqualTo(4));
        }