public void IsType1VisibleTest() { Assert.IsFalse(_presentationModel.IsType1Visible()); _quiz.ClickStart(10, "Pick up questions randomly"); _quiz.SetRandomQuestionType(1, 1); Assert.IsTrue(_presentationModel.IsType1Visible()); _quiz.ClickNext(); _quiz.SetRandomQuestionType(2, 2); Assert.IsFalse(_presentationModel.IsType1Visible()); _quiz.ClickNext(); _quiz.SetRandomQuestionType(3, 3); Assert.IsFalse(_presentationModel.IsType1Visible()); }
public void GetAnswerTest() { _quiz.ClickStart(10, "Pick up questions randomly"); Assert.IsNull(_quiz.GetAnswer1("")); Assert.IsNull(_quiz.GetAnswer2("")); _quiz.SetRandomQuestionType(1, 1); _quiz.SetRandomQuestionNumber(1, 0); _quiz.ClickNext(); Assert.AreEqual("Correct!!", _quiz.GetAnswer1("a")); _quiz.SetRandomQuestionType(2, 2); _quiz.SetRandomQuestionNumber(2, 0); _quiz.ClickNext(); Assert.AreEqual("Correct!!", _quiz.GetAnswer2("[冠]一個;一種")); _quiz.SetRandomQuestionType(3, 3); _quiz.SetRandomQuestionNumber(3, 0); _quiz.ClickNext(); Assert.AreEqual("Correct!!", _quiz.GetAnswer2("a")); }