public void ReadItems_Should_News_Items_With_Headline_Date_And_Link_From_BBC_Feed() { // Arrange RSSFeedParser rssFeedParser = new RSSFeedParser(FakeXMLFeed.GetFakeXMLFeed("bbc")); // Act var item = rssFeedParser.ReadItems()[0]; // Assert Assert.IsNotNull(item.Headline); Assert.IsNotNull(item.Url.AbsoluteUri); Assert.IsNotNull(item.Summary); Assert.AreNotEqual(DateTime.MinValue, item.DatePublished); }
public void ReadItems_Should_News_Items_With_Headline_Date_And_Link_From_Dilbert_Feed() { // Added for ticket 15 // Arrange XmlDocument xmlDoc = FakeXMLFeed.GetFakeXMLFeed("dilbert"); RSSFeedParser rssFeedParser = new RSSFeedParser(xmlDoc); // Act var item = rssFeedParser.ReadItems()[0]; // Assert Assert.IsNotNull(item.Headline, "Expected Headline"); Assert.IsNotNull(item.Url, "Expected Url"); Assert.IsNotNull(item.Summary, "Expected Summary"); Assert.AreNotEqual(DateTime.MinValue, item.DatePublished); }
public void ReadItems_Should_Return_39_News_Items_From_BBC_Feed() { // Arrange XmlDocument xmlDoc = FakeXMLFeed.GetFakeXMLFeed("bbc"); RSSFeedParser rssFeedParser = new RSSFeedParser(xmlDoc); // Act var items = rssFeedParser.ReadItems(); // Assert Assert.AreEqual(39, items.Count); }