Exemple #1
0
        public void TestPodcastInitialization()
        {
            MockMediaLocation location = new MockMediaLocation("test.vodcast");

            location.Contents  = "url : http://somewhere.com\n";
            location.Contents += "download_policy : FirstPlay\n";
            location.Contents += "files_to_retain : 10\n";

            VodCast vodcast = new VodCast();

            vodcast.Assign(location, null, Guid.NewGuid());

            Assert.AreEqual(vodcast.Url, "http://somewhere.com");
            Assert.AreEqual(vodcast.DownloadPolicy, DownloadPolicy.FirstPlay);
            Assert.AreEqual(vodcast.FilesToRetain, 10);
        }
Exemple #2
0
        public void TestPodcastFetching()
        {
            var backup = Kernel.Instance.MediaLocationFactory;

            MockMediaLocation location = new MockMediaLocation("test.vodcast");

            location.Contents = "url : http://www.abc.net.au/atthemovies/vodcast_wmv.xml";

            // our kernel needs to know how to retrieve our location.
            Kernel.Instance.MediaLocationFactory = new MockMediaLocationFactory(location);

            VodCast vodcast = new VodCast();

            vodcast.Assign(location, null, Guid.NewGuid());

            Assert.IsTrue(vodcast.Children.Count > 0);

            Kernel.Instance.MediaLocationFactory = backup;
        }
Exemple #3
0
        public void TestTEDPodcastFetching()
        {
            var backup = Kernel.Instance.MediaLocationFactory;

            MockMediaLocation location = new MockMediaLocation("test.vodcast");

            location.Contents = "url : http://feeds.feedburner.com/TedtalksHD?format=xml";

            // our kernel needs to know how to retrieve our location.
            Kernel.Instance.MediaLocationFactory = new MockMediaLocationFactory(location);

            VodCast vodcast = new VodCast();

            vodcast.Assign(location, null, Guid.NewGuid());

            Assert.IsTrue(vodcast.Children.Count > 0);

            Kernel.Instance.MediaLocationFactory = backup;
        }