public void CanCreateIFeedObjectForRssFileWithSimplePath()
        {
            var asyncResult = _factory.BeginCreateFeed(new Uri(SimpleRssPath, UriKind.Relative), null);

            Assert.IsNotNull(asyncResult.AsyncState);

            var resultFeed = _factory.EndCreateFeed(asyncResult);

            Assert.IsNotNull(resultFeed);
            Assert.IsTrue(resultFeed.Title.Length > 0);
            Assert.IsTrue(resultFeed.Items.Count > 0);
        }
        public void DoesFileSystemFeedFactoryThrowExceptionWhenCreateFeedAsyncAcceptsMissingFile(string rsslocation)
        {
            var feeduri = new Uri(rsslocation);

            Assert.That(() =>
            {
                var result        = Factory.BeginCreateFeed(feeduri, null);
                var resultantFeed = Factory.EndCreateFeed(result);
            }, Throws.TypeOf <MissingFeedException>());
        }
Example #3
0
        public void CanCreateFeedAsync(string rsslocation)
        {
            var feeduri       = new Uri(rsslocation);
            var result        = Factory.BeginCreateFeed(feeduri, null);
            var resultantFeed = Factory.EndCreateFeed(result);

            Assert.IsNotNull(resultantFeed, "The resultant FeedTuple from the Async operation should not be null!");
            Assert.That(resultantFeed.Title != String.Empty, "The resultant feed should not be empty!");
            Assert.AreEqual(feeduri, resultantFeed.FeedUri, "The two uris should be equal!");
            Assert.IsTrue(resultantFeed.Items.Count() > 0);
        }
 public void DoesHttpFeedFactoryThrowExceptionWhenCreateFeedAsyncAcceptsMissingFile(string rsslocation)
 {
     var feeduri       = new Uri(rsslocation);
     var result        = Factory.BeginCreateFeed(feeduri, null);
     var resultantFeed = Factory.EndCreateFeed(result);
 }