Exemple #1
0
        public void PostAnswerTest()
        {
            const int lessonId   = 0;
            const int stepId     = 0;
            const int questionId = 0;

            var answer = new Answer {
                QuestionId = questionId, SelectedAnswers = new List <int> {
                    0
                }
            };
            var result = controller.PostAnswer(courseProgressData.Id, lessonId, stepId, answer).Result;

            var question      = courseData.Lessons[lessonId].Steps[stepId].Questions[questionId];
            var expectedValue = question.GetQuestionState().Update(question, answer.SelectedAnswers);

            expectedValue.ProgressId = courseProgressData.Id;
            Utilits.CheckResponseValue <OkObjectResult, QuestionStateData>(result, expectedValue);
        }