Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public void SetUp()
 {
     _factory = new LocalWebApplicationFactory();
     Client   = _factory.CreateClient();
 }
Ejemplo n.º 3
0
        public void SetUp()
        {
            var factory = new LocalWebApplicationFactory();

            _client = factory.CreateClient();
        }