Exemplo n.º 1
0
        public MockQuestionRepository()
        {
            _context = new List <Question>();

            for (int i = 0; i < 2; i++)
            {
                var question = GetFakeQuiz.FullQuestion(i + 1);
                _context.Add(question);
            }
        }
Exemplo n.º 2
0
        public MockQuizRepository()
        {
            _context = new List <Quiz>();

            for (int i = 0; i < 5; i++)
            {
                var quiz = GetFakeQuiz.Entity(i + 1);

                if ((i + 1) % 2 == 0)
                {
                    quiz.TeacherId = 1;
                }
                else
                {
                    quiz.TeacherId = 2;
                }

                quiz.QuizQuestions.Add(GetFakeQuiz.FullQuestion((i + 1)));
                quiz.QuizQuestions.Add(GetFakeQuiz.FullQuestion((i + 1)));
                _context.Add(quiz);
            }
        }