public void GetFeeds_ValidInpunt_ReturnAllFeeds() { // TODO: write proper unit tests var parser = new Reader.Parser.Opml.Parser("<rss></rss>"); var expected = new List <OpmlSubscription>(); var actual = parser.GetFeeds(); Assert.Equal(expected, actual); }
static async Task Main(string[] args) { var data = System.IO.File.ReadAllText("feed.xml"); var opmlParser = new Parser.Opml.Parser(data); var feeds = opmlParser.GetFeeds(); var subscription = new Subscription(); var entries = await subscription.GetEntriesAsync(feeds); foreach (var entry in entries.OrderByDescending(entry => entry.PubDate)) { Console.WriteLine( $"{entry.PubDate.ToLocalTime().ToShortDateString()} {entry.PubDate.ToLocalTime().ToShortTimeString()} - {entry.Title} {entry.Link}"); } }