public async Task OneTimeSetUp() { var factory = new LocalWebApplicationFactory(); var client = factory.CreateClient(); await AuthenticateAdminAsync(client); var taskRequest = new CreateTaskRequest { Answer = "42", Question = "Meaning of life", Weight = 2, Variants = new List <string> { "foo", "bar", "42" } }; _firstTask = await client.CreateTaskAsync(taskRequest); _secondTask = await client.CreateTaskAsync(taskRequest); var quizRequest = new CreateQuizRequest { QuizName = QuizName, Tasks = new List <Guid> { _firstTask, _secondTask } }; _firstQuiz = await client.CreateQuizAsync(quizRequest); _secondQuiz = await client.CreateQuizAsync(quizRequest); }
public void SetUp() { _factory = new LocalWebApplicationFactory(); Client = _factory.CreateClient(); }
public void SetUp() { var factory = new LocalWebApplicationFactory(); _client = factory.CreateClient(); }