예제 #1
0
        public async Task LoadChannelFromUrlParsesFeed()
        {
            PodcastViewModel.FeedParser = new FeedParser();

            ChannelStore.Add(Arg.Any <Channel>()).Returns(1);

            var testFeedPath = Path.GetFullPath(@"..\..\Assets\feed.xml");

            await PodcastViewModel.LoadChannelFromUrlCommand.Execute(testFeedPath);

            PodcastViewModel.Channels.Should().NotBeEmpty("channel was added");

            var channel = PodcastViewModel.Channels.First();

            channel.Description.Should().NotBeEmpty();
            channel.Title.Should().NotBeEmpty();
            channel.ImageUrl.Should().NotBeEmpty();
            channel.LastUpdated.Should().Should().NotBeNull();
            channel.Link.Should().NotBeEmpty();
            channel.Episodes.Should().NotBeEmpty();
            channel.ImageUrl.Should().NotBeEmpty();

            channel.Episodes.Should().NotBeEmpty();
        }