Esempio n. 1
0
 // metoda care incrementeaza raspunsurile corecte/incorecte pentru fiecare intrebare
 public void UpdateQuizResult(RadioButton selectedOption)
 {
     if (DataInstance.GetRightAnswerByQuestionId(PanelsCounter + 1) == selectedOption.Name)
     {
         selectedOption.ForeColor = Color.Green;
         CorrectAnswersCount++;
         DisplayMessage("Raspuns corect!");
     }
     else
     {
         ShowCorrectAnswer(selectedOption);
         selectedOption.ForeColor = Color.Red;
         IncorrectAnswersCount++;
         DisplayMessage("Raspuns Incorect!");
     }
 }
        public void GetCorrectAnswerById_0()
        {
            QuestionsRetriever DataInstance = QuestionsRetriever.Instance();

            Assert.AreEqual(String.Empty, DataInstance.GetRightAnswerByQuestionId(0));
        }
        public void GetCorrectAnswerById_1()
        {
            QuestionsRetriever DataInstance = QuestionsRetriever.Instance();

            Assert.AreEqual("C", DataInstance.GetRightAnswerByQuestionId(1));
        }