Example #1
0
 public SingleChoiceQuestion(int pollId, string qText, int number, IEnumerable <string> choices)
     : base(pollId, qText, number)
 {
     Choices        = choices;
     QuestionType   = QuestionType.SingleChoice;
     statsGenerator = new SingleChoiceQuestionStatisticsGenerator();
 }
 public SingleChoiceQuestionStatsGenerator()
 {
     // Arrange.
     statsGenerator = new SingleChoiceQuestionStatisticsGenerator();
     question       = new SingleChoiceQuestion(1, "test question", 1, new string[] { "opcja 1", "opcja 2", "opcja 3" });
     answers        = new List <Answer>
     {
         new SingleChoiceAnswer {
             Id = 1, Choice = "opcja 1", QuestionId = question.Id
         },
         new SingleChoiceAnswer {
             Id = 2, Choice = "opcja 2", QuestionId = question.Id
         },
         new SingleChoiceAnswer {
             Id = 3, Choice = "opcja 3", QuestionId = question.Id
         },
         new SingleChoiceAnswer {
             Id = 4, Choice = "opcja 1", QuestionId = question.Id
         },
     };
 }
Example #3
0
 protected SingleChoiceQuestion()
 {
     statsGenerator = new SingleChoiceQuestionStatisticsGenerator();
 }