public void ShouldLoadInShows()
        {
            ShowLibraryService showLibraryService = new ShowLibraryService();

            eWolfPodcast pods = new eWolfPodcast();

            List <eWolfPodcastShowsShow> shows = new List <eWolfPodcastShowsShow>();
            eWolfPodcastShowsShow        show  =
                new eWolfPodcastShowsShow()
            {
                Category    = "DEV",
                Description = "My dev podcast",
                Name        = "DEV one",
                Url         = "WWW.Somewhere"
            };

            shows.Add(show);
            eWolfPodcastShows showfile = new eWolfPodcastShows
            {
                Show = shows.ToArray()
            };

            pods.Shows = showfile;

            showLibraryService.ProcessFiles(pods);
            showLibraryService.GetList().Should().HaveCount(1);

            ShowLibraryData showFromLibrary = showLibraryService.GetList()[0];

            showFromLibrary.Name.Should().Be("DEV one");
            showFromLibrary.Catergery.Should().Be("DEV");

            showFromLibrary.Description.Should().Be("My dev podcast");
            showFromLibrary.URL.Should().Be("WWW.Somewhere");
        }
Exemplo n.º 2
0
        private bool IsShowAllReadyAdded(ShowLibraryData it)
        {
            CatergeryData cd = new CatergeryData(it.Catergery);
            ShowControl   sc = new ShowControl()
            {
                Title     = it.Name,
                RssFeed   = it.URL,
                Catergery = cd
            };

            return(Shows.GetShowService.Contains(sc));
        }
Exemplo n.º 3
0
        internal void ProcessFiles(eWolfPodcast eWolfPodcast)
        {
            _library.Clear();

            foreach (eWolfPodcastShowsShow podcast in eWolfPodcast.Shows.Show)
            {
                if (podcast != null)
                {
                    ShowLibraryData sld = new ShowLibraryData
                    {
                        Name        = podcast.Name,
                        Description = podcast.Description,
                        Catergery   = podcast.Category,
                        URL         = podcast.Url
                    };
                    _library.Add(sld);
                }
            }
        }