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

            question.AnswerQuestion(true);

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

            question.AnswerQuestion(true);

            var actual = question.QuestionAnsweredCorrectly();

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

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

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

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

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