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)); }
public void CanWriteFeedsToIsolatedStorageWithSimplePath() { var items = SilverlightTestFileLoader.SampleRssFeeds(); var feedXml = SilverlightTestFileLoader.ReadFeedContents(items[0]); var feedPath = new Uri(SimpleFileUri, UriKind.Relative); SilverlightTestFileLoader.WriteFeedToIsolatedStorage(feedXml, feedPath); using (var store = IsolatedStorageFile.GetUserStoreForApplication()) { Assert.IsTrue(store.FileExists(feedPath.OriginalString)); } }
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)); } }
public void CanWriteFeedsToIsolatedStorageWithComplexPath() { try { var items = SilverlightTestFileLoader.SampleRssFeeds(); var feedXml = SilverlightTestFileLoader.ReadFeedContents(items[0]); var feedPath = new Uri(ComplexFileUri, UriKind.Relative); SilverlightTestFileLoader.WriteFeedToIsolatedStorage(feedXml, feedPath); using (var store = IsolatedStorageFile.GetUserStoreForApplication()) { Assert.IsTrue(store.FileExists(feedPath.OriginalString)); } } catch (Exception ex) { var debugEx = ex; Assert.Fail(string.Format("Caught error {0}", ex.Message)); } }
public void CanFindAtomTestFiles() { var items = SilverlightTestFileLoader.SampleAtomFeeds(); Assert.IsTrue(items.Count > 0); }