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);
        }
示例#3
0
        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();
        }
示例#4
0
 public Form1()
 {
     InitializeComponent();
     urlReader = new PodcastController();
 }
示例#5
0
 private void beskrivningList_SelectedIndexChanged(object sender, EventArgs e)
 {
     txtBeskrivning.Text = "";
     txtBeskrivning.Text = PodcastController.GETPERSONDETAILSBYNAME(avsnittList.SelectedItem.ToString());
 }
示例#6
0
 private void CreateControllers()
 {
     this.categoryContoller = new CategoryContoller();
     this.podcastController = new PodcastController();
 }