Example #1
0
        public void SawIfTheLastQuestionInRootIsMonkey()
        {
            newControl = new clsControl();

            string expected = "Monkey";

            clsQuestion result = newControl.GetQuestionByIndex(newControl.lstRootQuestion.Count - 1);

            Assert.AreEqual(result.AnimalName, expected, "The questions are no Equals");
        }
Example #2
0
        public void GetQuestionByIndexTest()
        {
            newControl = new clsControl();

            string expected = "Live in water";

            clsQuestion result = newControl.GetQuestionByIndex(0);

            Assert.AreEqual(result.Characteristic, expected, "The questions are no Equals");
        }
Example #3
0
        public void SetQuestionInRoot()
        {
            clsQuestion newQuestion = new clsQuestion("Touro", "Tem Chifre", false);

            newControl = new clsControl();

            newControl.PlaceQuestionInRoot(newQuestion);

            string expected = "Monkey";

            clsQuestion result = newControl.GetQuestionByIndex(newControl.lstRootQuestion.Count - 1);

            Assert.AreEqual(result.AnimalName, expected, "The questions are no Equals");

            expected = "Touro";
            result   = newControl.GetQuestionByIndex(newControl.lstRootQuestion.Count - 2);

            Assert.AreEqual(result.AnimalName, expected, "The questions are no Equals");
        }
 public QuestionWindowViewModel(clsControl _objGC)
 {
     objGC                    = _objGC;
     blnNotOpenMain           = false;
     strMessageCharacteristic = "Does the animal that you thought about \n {0}?";
     strMessageAnimal         = "Is the animal that you thought \n about a {0}?";
     intListIndex             = 0;
     qtnTmpQuestion           = objGC.GetQuestionByIndex(intListIndex);
     blnEnd                   = false;
     lblQuestion              = string.Format(strMessageCharacteristic, qtnTmpQuestion.Characteristic);
 }