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"); }
private void PopulateCatergies() { ShowLibraryService showLibraryService = ShowLibraryService.GetLibrary; List <string> allGroups = showLibraryService.Groups().Select(x => x.Name).ToList(); _groupNames = new List <string>(); foreach (string group in allGroups) { List <ShowLibraryData> shows = showLibraryService.GetList(group); if (shows.Any(x => !IsShowAllReadyAdded(x))) { _groupNames.Add(group); } } LibraryCategories.ItemsSource = _groupNames; }
private void PopulateGroup() { if (_currentGroupName != null) { _libraryItem.Clear(); ShowLibraryService showLibraryService = ShowLibraryService.GetLibrary; _groups = showLibraryService.Groups(); foreach (ShowLibraryData it in showLibraryService.GetList(_currentGroupName)) { if (!IsShowAllReadyAdded(it)) { LibraryItem li = new LibraryItem(); li.ShowLibraryData = it; li.LibraryMain = this; _libraryItem.Add(li); } } } LibraryShows.ItemsSource = _libraryItem; }