Ejemplo n.º 1
0
        public void GetCorrectAnswersLetters_NoneCorrect()
        {
            exampleQuestion.CorrectAnswer = "";

            var correctAnswers = QuestionWithChoicesTools.GetCorrectAnswersLetters(exampleQuestion);

            Assert.Empty(correctAnswers);
        }
Ejemplo n.º 2
0
        public void GetCorrectAnswersLetters_Normal()
        {
            var correctAnswers = QuestionWithChoicesTools.GetCorrectAnswersLetters(exampleQuestion);

            var expected = new string[] { "A", "B" };

            Assert.True(expected.SequenceEqual(correctAnswers));
        }
Ejemplo n.º 3
0
        public void GetCorrectAnswersLetters_SingleCorrect()
        {
            exampleQuestion.Type          = QuestionType.SingleChoice;
            exampleQuestion.CorrectAnswer = "X";

            var correctAnswers = QuestionWithChoicesTools.GetCorrectAnswersLetters(exampleQuestion);

            var expected = new string[] { "X" };

            Assert.True(expected.SequenceEqual(correctAnswers));
        }