Exemple #1
0
        public void AnswerQuestion_AnswerSet_AnswerWasSet()
        {
            Question question = EmptyQuestion();

            question.AnswerQuestion(true);

            Assert.AreEqual(true, question.Answer);
        }
Exemple #2
0
 private void AnswerTheQuestion(Answer answer)
 {
     if (_currentQuestion.AnswerQuestion(answer))
     {
         _currentQuizScore.Value += 1;
     }
     AdvanceQuestion();
 }
Exemple #3
0
        public void QuestionAnsweredCorrectly_CorrectAnswerGiven_ReturnsTrue()
        {
            Question question = QuestionWithTrueAnswer();

            question.AnswerQuestion(true);

            var actual = question.QuestionAnsweredCorrectly();

            Assert.IsTrue(actual);
        }
Exemple #4
0
        public void TestDivision()
        {
            Question question = new Question(2, Question.QuestionType.Division, 2, "2/2");

            Assert.IsTrue(question.AnswerQuestion(1));
        }
Exemple #5
0
        public void TestMultiplication()
        {
            Question question = new Question(2, Question.QuestionType.Multiplication, 2, "2*2");

            Assert.IsTrue(question.AnswerQuestion(4));
        }
Exemple #6
0
        public void TestSubtraction()
        {
            Question question = new Question(2, Question.QuestionType.Subtraction, 2, "2-2");

            Assert.IsTrue(question.AnswerQuestion(0));
        }
Exemple #7
0
        public void TestAddition()
        {
            Question question = new Question(2, Question.QuestionType.Addition, 2, "2+2");

            Assert.IsTrue(question.AnswerQuestion(4));
        }