Ejemplo n.º 1
0
 // afiseaza in panelul existent urmatoarea intrebare
 private void UpdatePanel()
 {
     try
     {
         textBoxQuestion.Text = DataInstance.GetQuestionById(PanelsCounter + 1);
         A.Text = DataInstance.GetFirstAnswerByQuestionId(PanelsCounter + 1);
         B.Text = DataInstance.GetSecondAnswerByQuestionId(PanelsCounter + 1);
         C.Text = DataInstance.GetThirdAnswerByQuestionId(PanelsCounter + 1);
     }
     catch (System.IndexOutOfRangeException e)
     {
         System.Console.WriteLine(e.Message);
         throw new System.ArgumentOutOfRangeException("index parameter is out of range.", e);
     }
 }
        public void GetThirdAnswerById_11()
        {
            QuestionsRetriever DataInstance = QuestionsRetriever.Instance();

            Assert.AreEqual(String.Empty, DataInstance.GetThirdAnswerByQuestionId(11));
        }
        public void GetThirdAnswerById_1()
        {
            QuestionsRetriever DataInstance = QuestionsRetriever.Instance();

            Assert.AreEqual("cel mult 5 km/h.", DataInstance.GetThirdAnswerByQuestionId(1));
        }