public void Can_Bulk_Delete_PhotographConsents_For_All_Results() { Guid pupil1Id = Guid.NewGuid(); Guid pupil2Id = Guid.NewGuid(); string yearGroupFullName = Utilities.GenerateRandomString(10, "FNBuT2"); DataPackage dataPackage = GetDataPackage("BuT2", pupil1Id, pupil2Id, yearGroupFullName); using (new DataSetup(purgeBeforeInsert: false, purgeAfterTest: true, packages: dataPackage)) { try { //Arrange var bulkUpdatePupilConsentsDetail = BulkUpdateMenuLinks.Consents .Search .WithYearGroupsAs(yearGroupFullName) .SearchAndReturnDetail(); // Add a record bulkUpdatePupilConsentsDetail .SelectConsentType(_consentMenuDescription) .WithFloodFillActiveAs(true) .Save(); //Act - delete bulkUpdatePupilConsentsDetail .SelectConsentType(_consentMenuDescription) .WithFloodFillActiveAs(false) .Save(); //Assert Assert.IsTrue(bulkUpdatePupilConsentsDetail.HasSavedSuccessfully); } finally { PurgeLinkedData.DeleteLearnerConsentType(pupil1Id); PurgeLinkedData.DeleteLearnerConsentType(pupil2Id); } } }