Example #1
0
        public async Task AddStudy_ShouldCreateResourceGroupForStudySpecificDatasets(bool isAdmin, bool isSponsor)
        {
            SetScenario(isEmployee: true, isAdmin: isAdmin, isSponsor: isSponsor);

            var createStudyApiConversation = await StudyCreator.CreateAndExpectSuccess(_restHelper);

            CreateStudyAsserts.ExpectSuccess(createStudyApiConversation.Request, createStudyApiConversation.Response);

            var databaseEntryForStudyDatasetResourceGroup = await SliceFixture.GetResource(studyId : createStudyApiConversation.Response.Content.Id);

            CloudResourceBasicAsserts.StudyDatasetResourceGroupBeforeProvisioningAssert(databaseEntryForStudyDatasetResourceGroup);

            //SETUP INFRASTRUCTURE BY RUNNING A METHOD ON THE API
            _ = await ProcessWorkQueue();

            //Get resource from database again and assert
            databaseEntryForStudyDatasetResourceGroup = await SliceFixture.GetResource(studyId : createStudyApiConversation.Response.Content.Id);

            CloudResourceBasicAsserts.StudyDatasetResourceGroupAfterProvisioningAssert(databaseEntryForStudyDatasetResourceGroup);
        }