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."); }
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); }
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); }