Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        public void DeleteActiveExistingManifest()
        {
            IIngestManifest ingestManifest = CreateManifestWithAssetsAndVerifyIt(_mediaContext);

            ingestManifest.Delete();
        }