Exemple #1
0
        public void TestAppInvalidWhenNoPodcastInfo()
        {
            IConfigurationManager configManager = GetConfigurationManager();
            PodcastApp            app           = new PodcastApp();

            TestInvalidApp(app, "No podcasts have been registered with this app. Please register podcasts to play.");
        }
Exemple #2
0
        public void TestAppValidWhenPodcastInfoExists()
        {
            IConfigurationManager configManager = GetConfigurationManager();

            PodcastApp  app  = new PodcastApp();
            PodcastInfo info = new PodcastInfo("Test Podcast", new Uri(Directory.GetCurrentDirectory() + "/testRssFeed.xml", UriKind.Absolute), false);

            app.AddChild(info);

            Assert.AreEqual(true, app.IsValid);
        }
Exemple #3
0
        public void TestResumePodcastGrammar()
        {
            Dictionary <String, String> expectedParams = new Dictionary <string, string>
            {
                { "Command", "podcast" },
                { "Subcommand", "resume" },
            };
            IConfigurationManager configManager = GetConfigurationManager();

            PodcastApp  app  = new PodcastApp();
            PodcastInfo info = new PodcastInfo("Test Podcast", new Uri(Directory.GetCurrentDirectory() + "/testRssFeed.xml", UriKind.Absolute), false);

            app.AddChild(info);

            TestGrammar(app, configManager, "Resume the current podcast", expectedParams);
        }