private static void VerifyAssetStateAndDelete(IngestManifestState expectedState, string id) { IIngestManifest ingestManifest = WindowsAzureMediaServicesTestConfiguration.CreateCloudMediaContext().IngestManifests.Where(c => c.Id == id).FirstOrDefault(); Assert.IsNotNull(ingestManifest); Assert.AreEqual(expectedState, ingestManifest.State); ingestManifest.Delete(); }
public void DeleteManifestShouldDeleteAllManifestAssetsAndFiles() { CloudMediaContext context = WindowsAzureMediaServicesTestConfiguration.CreateCloudMediaContext(); IIngestManifest ingestManifest = CreateManifestWithAssetsAndVerifyIt(context); VerifyExistenceofAssetsAndFilesForManifest(ingestManifest, context); ingestManifest.Delete(); context = WindowsAzureMediaServicesTestConfiguration.CreateCloudMediaContext(); int assetsCount = context.IngestManifestAssets.Where(c => c.ParentIngestManifestId == ingestManifest.Id).Count(); int filescount = context.IngestManifestFiles.Where(c => c.ParentIngestManifestId == ingestManifest.Id).Count(); Assert.AreEqual(0, assetsCount, "There are assets belonging to manifest after manifest deletion"); Assert.AreEqual(0, filescount, "There are files belonging to manifest assets after manifest deletion"); }
public void CreateEmptyManifestAndDeleteIt() { IIngestManifest ingestManifest = CreateEmptyManifestAndVerifyIt(); string id = ingestManifest.Id; ingestManifest.Delete(); VerifyManifestDeletion(id); ingestManifest = CreateEmptyManifestAndVerifyIt(); id = ingestManifest.Id; Assert.IsFalse(String.IsNullOrEmpty(ingestManifest.Name)); Task t = ingestManifest.DeleteAsync(); t.Wait(); VerifyManifestDeletion(id); }
public void DeleteActiveExistingManifest() { IIngestManifest ingestManifest = CreateManifestWithAssetsAndVerifyIt(_mediaContext); ingestManifest.Delete(); }