public void Setup() { _quizEngine = new QuizEngineCore(); _quizEngine.AddUser(UserEmail); _multipleChoiceQuestion.Question = "Who are the best heavy metal band?"; _multipleChoiceQuestion.Options.Add("Black Sabbath"); _multipleChoiceQuestion.Options.Add("Judas Priest"); _multipleChoiceQuestion.Options.Add("Metallica"); _multipleChoiceQuestion.Options.Add("Iron Maiden"); _multipleChoiceQuestion.CorrectAnswer = "Iron Maiden"; var quiz = new Quiz { Uuid = new UUID { Value = _quizUuid.ToString() } }; quiz.Questions.Add(_multipleChoiceQuestion); _quizEngine.AddQuiz(quiz); }
public override Task <AddQuizReply> AddQuiz(AddQuizRequest request, ServerCallContext context) { _quizEngine.AddQuiz(request.Quiz); return(Task.FromResult(new AddQuizReply())); }