public void AddQuestion_RelationAdded()
        {
            // arrange
            QuizEditModel quiz            = _quizBackofficeService.GetAll().First();
            Guid          dummyQuestionId = stubQuestionOutsideQuiz.Id;

            // act
            _quizBackofficeService.AddQuestion(quiz.Id, dummyQuestionId);

            //assert
            QuizEditModel savedQuiz = _quizBackofficeService.GetAll().First(q => q.Id == quiz.Id);

            Assert.Contains(savedQuiz.Questions, q => q.Id == dummyQuestionId);
        }
示例#2
0
        public IEnumerable <QuizEditModel> Quiz()
        {
            var result = _quizBackofficeService.GetAll();

            return(result);
        }