public void getAnswer_NormalTest() { // Arrange String strQuestion = "Test 201"; String strAnswer = "Answer 201"; Question q = new ShortAnswerQuestion(strQuestion, strAnswer); //Act String strResult = q.getAnswer(); //Assert Assert.AreEqual(strAnswer, strResult); }
public void checkAnswer_WrongAnswerTest() { // Arrange String strQuestion = "Test 304"; String strAnswer = "Given Answer 304"; String strWrongAnswer = "Wrong Answer 304"; Question q = new ShortAnswerQuestion(strQuestion, strAnswer); //Act String strResult = q.getAnswer(); //Assert Assert.IsFalse(q.checkAnswer(strWrongAnswer)); }