public void AnswerTest() { QuizController target = new QuizController(); int question = 0; var answers = new int[] {1}; string quizId ="quizzes-1"; var actual = target.Answer(question, answers,quizId) as JsonResult; dynamic data = actual.Data; Assert.IsTrue(data.correct == false); Assert.IsTrue(data.message == "Test message"); }
public void IndexTest() { QuizController target = new QuizController(); // TODO: Initialize to an appropriate value var actual = target.Index() as ViewResult; Assert.IsInstanceOfType(actual.Model,typeof(Question)); }