public void ShouldGetExpectedQuestionnaireAnswers()
        {
            var questionRepository = new QuestionRepository();

            var questionnaire = questionRepository.GetAnswers();

            Assert.That(questionnaire[0], Is.EqualTo("Havana"));
            Assert.That(questionnaire[1], Is.EqualTo("Paris"));
            Assert.That(questionnaire[2], Is.EqualTo("Warsaw"));
            Assert.That(questionnaire[3], Is.EqualTo("Berlin"));
        }
示例#2
0
        public QuestionModel GetQuestionWithAnswers(Guid questionId)
        {
            var question      = _questionRepository.GetQuestion(questionId);
            var answers       = _questionRepository.GetAnswers(questionId);
            var questionModel = new QuestionModel();

            questionModel.Id    = questionId;
            questionModel.Title = question.Title;
            questionModel.Tags  = _questionRepository.GetQuestionTags(questionId);
            //questionModel.Answers = answers;
            questionModel.Description = question.Description;
            return(questionModel);
        }