Beispiel #1
0
        public void WhenGetContextIsCalledThenScriptCsPackContextIsReturned()
        {
            var mediaServicesScriptPack = new AzureMediaServicesScriptPack();

            var context = mediaServicesScriptPack.GetContext();

            Assert.IsNotNull(context);
            Assert.IsInstanceOfType(context, typeof(AzureMediaServices));
        }
        public void WhenGetContextIsCalledThenScriptCsPackContextIsReturned()
        {
            var mediaServicesScriptPack = new AzureMediaServicesScriptPack();

            var context = mediaServicesScriptPack.GetContext();

            Assert.IsNotNull(context);
            Assert.IsInstanceOfType(context, typeof(AzureMediaServices));
        }
Beispiel #3
0
        public void WhenInitializeIsCalledThenScriptCsAzureMediaServicesAndWindowsMediaServicesClientNamespacesAreImported()
        {
            var importedNamespace = new List <string>();

            var session = new StubIScriptPackSession
            {
                ImportNamespaceString = ns => importedNamespace.Add(ns)
            };

            var mediaServicesScriptPack = new AzureMediaServicesScriptPack();

            mediaServicesScriptPack.Initialize(session);

            Assert.IsTrue(importedNamespace.Contains("ScriptCs.AzureMediaServices"));
            Assert.IsTrue(importedNamespace.Contains("Microsoft.WindowsAzure.MediaServices.Client"));
        }
        public void WhenInitializeIsCalledThenScriptCsAzureMediaServicesAndWindowsMediaServicesClientNamespacesAreImported()
        {
            var importedNamespace = new List<string>();

            var session = new StubIScriptPackSession
            {
                ImportNamespaceString = ns => importedNamespace.Add(ns)
            };

            var mediaServicesScriptPack = new AzureMediaServicesScriptPack();

            mediaServicesScriptPack.Initialize(session);

            Assert.IsTrue(importedNamespace.Contains("ScriptCs.AzureMediaServices"));
            Assert.IsTrue(importedNamespace.Contains("Microsoft.WindowsAzure.MediaServices.Client"));
        }
Beispiel #5
0
        public void WhenInitializeIsCalledAndSessionIsNotProvidedThenAnExceptionIsThrown()
        {
            var mediaServicesScriptPack = new AzureMediaServicesScriptPack();

            mediaServicesScriptPack.Initialize(null);
        }
        public void WhenInitializeIsCalledAndSessionIsNotProvidedThenAnExceptionIsThrown()
        {
            var mediaServicesScriptPack = new AzureMediaServicesScriptPack();

            mediaServicesScriptPack.Initialize(null);
        }