コード例 #1
0
        private AnswerModel GetSampleAnswerModel()
        {
            AnswerModel ansmodel = new AnswerModel();
            ansmodel.Questions = sampleQuestions;
            ansmodel.Score = 100;

            return ansmodel;
        }
コード例 #2
0
        public void TestSetup()
        {
            MockQuest = new Mock<IQuest>();
            target = new QuestionController(MockQuest.Object);

            sampleQuestions = GetSampleQuestion(10);
            sampleAnswers = GetSampleAnswerModel();
            MockQuest.Setup(t => t.GetQuestions(10)).Returns(sampleQuestions);
            MockQuest.Setup(t => t.GetAnswers(It.IsAny<List<QuestionModel>>())).Returns(sampleAnswers);
        }