예제 #1
0
        public async Task OneTimeSetUp()
        {
            _firstTask = VariantTask.CreateNew(
                "foo",
                FirstAnswer,
                new List <string> {
                "baz", "quuz", FirstAnswer
            },
                2);

            _secondTask = VariantTask.CreateNew(
                "bar",
                SecondAnswer,
                new List <string> {
                SecondAnswer, "quux", "baq"
            },
                2);

            _quiz = Quiz.CreateNew(QuizName, new List <VariantTask> {
                _firstTask, _secondTask
            });

            var unitOfWork = await DbSetUpFixture.GetUnitOfWorkAsync();

            await unitOfWork.Tasks.AddTaskAsync(_firstTask);

            await unitOfWork.Tasks.AddTaskAsync(_secondTask);

            await unitOfWork.Quizzes.AddQuizAsync(_quiz);

            await unitOfWork.SaveAsync();
        }
예제 #2
0
파일: TaskTests.cs 프로젝트: gtoru/server
        public async Task OneTimeSetUp()
        {
            var unitOfWork = await DbSetUpFixture.GetUnitOfWorkAsync();

            _task = VariantTask.CreateNew(
                Question,
                Answer,
                new List <string> {
                A, B, C
            },
                2);

            await unitOfWork.Tasks.AddTaskAsync(_task);

            await unitOfWork.SaveAsync();
        }
예제 #3
0
파일: TaskTests.cs 프로젝트: gtoru/server
 public async Task SetUp()
 {
     _unitOfWork = await DbSetUpFixture.GetUnitOfWorkAsync();
 }