public void ShouldGetFeed() { // Given var context = new Context <PodcastController>(); Guid podcastId = Guid.NewGuid(); PodcastController sut = context.CreateSut(); // When ViewResult result = sut.Feed(podcastId) as ViewResult; // Then result.Should().NotBeNull(); result.Model.Should().BeOfType <FeedModel>(); FeedModel model = (FeedModel)result.Model; model.Should().NotBeNull(); }
public void ShouldGetIndex() { // Given var context = new Context <PodcastController>(); PodcastController sut = context.CreateSut(); // When ViewResult result = sut.Index() as ViewResult; // Then result.Should().NotBeNull(); result.Model.Should().BeOfType <PodcastViewModel>(); PodcastViewModel model = (PodcastViewModel)result.Model; model.FeedUrl.Should().BeNull(); model.Podcasts.Should().HaveCount(2); }
public Form_Podcast() { InitializeComponent(); //Skapar Controllers och Validations kategoriController = new KategoriController(); podcastController = new PodcastController(); podcastValidation = new PodcastValidation(); kategoriValidation = new KategoriValidation(); //Visar och döljer olika knappar/ textfält Spara_Podcast.Enabled = false; button_Visa.Enabled = false; textBox_URL.Enabled = true; //Sätter ett tidsintervall på timern, vad den ska göra och startar den timer.Interval = 1000; timer.Tick += Timer_Tick; timer.Start(); ShowKategori(); ShowPodcasts(); AddPodcastToTimerList(); }
public Form1() { InitializeComponent(); urlReader = new PodcastController(); }
private void beskrivningList_SelectedIndexChanged(object sender, EventArgs e) { txtBeskrivning.Text = ""; txtBeskrivning.Text = PodcastController.GETPERSONDETAILSBYNAME(avsnittList.SelectedItem.ToString()); }
private void CreateControllers() { this.categoryContoller = new CategoryContoller(); this.podcastController = new PodcastController(); }