public async Task <ActionResult> TestGroupDetails(Guid testGroupGuid)
        {
            TestGroupRepository testGroupRepo = new TestGroupRepository();
            var testGroupTask = testGroupRepo.GetByIdAsync(testGroupGuid);

            ApplicationUserRepository <Tester> userRepo = new ApplicationUserRepository <Tester>();
            var testerTask = userRepo.GetByUserNameAsync(User.Identity.Name);

            TestGroupsRepository testGroupsRepo = new TestGroupsRepository();

            ViewBag.Takened   = testGroupsRepo.GetGroupStatus(await testGroupTask, await testerTask);
            ViewBag.TestsGuid = testGroupsRepo.GetByTestGroupForTester(await testerTask, await testGroupTask);
            return(View(await testGroupTask));
        }
        public async Task TakeGroup(Guid groupId)
        {
            TestGroupRepository testGroupRepo = new TestGroupRepository();
            var testGroupTask = testGroupRepo.GetByIdAsync(groupId);

            ApplicationUserRepository <Tester> userRepo = new ApplicationUserRepository <Tester>();
            var testerTask = userRepo.GetByUserNameAsync(User.Identity.Name);

            TestGroups testGroups = new TestGroups();

            testGroups.TestGroup = await testGroupTask;
            testGroups.Status    = GroupStatus.Takened;
            testGroups.Takened   = DateTime.Now;
            testGroups.Tester    = await testerTask;

            TestGroup       testGroup = await testGroupTask;
            TestsRepository testsRepo = new TestsRepository();

            foreach (var testCase in testGroup.TestCases)
            {
                if (!testsRepo.IsTestTakened(testCase, await testerTask))
                {
                    DataAccess.Model.Tests.Tests tests = new DataAccess.Model.Tests.Tests();
                    tests.Test    = testCase;
                    tests.Status  = TestsStatus.Takened;
                    tests.Takened = DateTime.Now;
                    tests.Tester  = await testerTask;

                    testsRepo.Create(tests);
                }
            }

            TestGroupsRepository testGroupsRepo = new TestGroupsRepository();

            testGroupsRepo.Create(testGroups);
        }