Beispiel #1
0
        public int LoadOpml(string filename)
        {
            var dest = new RssOpml(new SynchronizationContext(), IO)
                       .Load(GetExamplesWith(filename), new Dictionary <Uri, RssFeed>())
                       .Flatten();

            foreach (var item in dest)
            {
                if (item is RssEntry re)
                {
                    Assert.That(re.Uri, Is.Not.Null);
                    Assert.That(re.Link, Is.Not.Null, re.Uri.ToString());
                    Assert.That(re.Title, Is.Not.Null.And.Not.Empty, re.Uri.ToString());
                }
                else
                {
                    Assert.That((item as RssCategory).Title, Is.Not.Null.And.Not.Empty);
                }
            }

            return(dest.Count());
        }
Beispiel #2
0
        public int LoadOpml(string filename)
        {
            var dest = new RssOpml(Invoker.Vanilla, IO)
                       .Load(GetSource(filename), new Dictionary <Uri, RssFeed>())
                       .Flatten();

            foreach (var item in dest)
            {
                if (item is RssEntry re)
                {
                    Assert.That(re.Uri, Is.Not.Null);
                    Assert.That(re.Link, Is.Not.Null, re.Uri.ToString());
                    Assert.That(re.Title, Is.Not.Null.And.Not.Empty, re.Uri.ToString());
                }
                else
                {
                    Assert.That((item as RssCategory).Title, Is.Not.Null.And.Not.Empty);
                }
            }

            return(dest.Count());
        }