Пример #1
0
        public void Initialize()
        {
            _factory     = new IsolatedStorageFeedFactory();
            _rssDocument = _factory.CreateFeed(new Uri(SilverlightTestFileLoader.SampleRssFeeds().First(), UriKind.Relative), FeedType.Rss20,
                                               SilverlightTestFileLoader.ReadFeedContents(SilverlightTestFileLoader.SampleRssFeeds().First()));

            _atomDocument = _factory.CreateFeed(new Uri(SilverlightTestFileLoader.SampleAtomFeeds().First(), UriKind.Relative), FeedType.Atom10,
                                                SilverlightTestFileLoader.ReadFeedContents(SilverlightTestFileLoader.SampleAtomFeeds().First()));
        }
 public void Initialize()
 {
     _factory     = new IsolatedStorageFeedFactory();
     _rssDocument =
         SilverlightTestFileLoader.ReadFeedContents(SilverlightTestFileLoader.SampleRssFeeds().First());
     _atomDocument =
         SilverlightTestFileLoader.ReadFeedContents(SilverlightTestFileLoader.SampleAtomFeeds().First());
     SilverlightTestFileLoader.WriteFeedToIsolatedStorage(_rssDocument, new Uri(SimpleRssPath, UriKind.Relative));
     SilverlightTestFileLoader.WriteFeedToIsolatedStorage(_rssDocument, new Uri(ComplexRssPath, UriKind.Relative));
     SilverlightTestFileLoader.WriteFeedToIsolatedStorage(_atomDocument, new Uri(SimpleAtomPath, UriKind.Relative));
     SilverlightTestFileLoader.WriteFeedToIsolatedStorage(_atomDocument, new Uri(ComplexAtomPath, UriKind.Relative));
 }
Пример #3
0
 public void CanParseAtomTestFiles()
 {
     try
     {
         var            items       = SilverlightTestFileLoader.SampleAtomFeeds();
         IList <string> parsedItems = items.Select(SilverlightTestFileLoader.ReadFeedContents).ToList();
         Assert.IsTrue(parsedItems.Count > 0);
         Assert.IsTrue(parsedItems[0].Length > 0);
     }
     catch (Exception ex)
     {
         var debugEx = ex;
         Assert.Fail(string.Format("Caught error {0}", ex.Message));
     }
 }
Пример #4
0
        public void CanFindAtomTestFiles()
        {
            var items = SilverlightTestFileLoader.SampleAtomFeeds();

            Assert.IsTrue(items.Count > 0);
        }