Esempio n. 1
0
 public ActionResult Index(FeedViewModel viewModel)
 {
     var feed = new AtomFeed(viewModel.Url) { Reader = this.Reader };
     feed.PopulateEntries();
     var entriesViewModel = new PopulateFeedViewModel();
     entriesViewModel.Entries.AddRange(feed.Entries.Select(entry => new FeedEntryViewModel { Title = entry.Title }).ToList());
     return this.View(entriesViewModel);
 }
Esempio n. 2
0
 public void AddAtomFeedShouldWork()
 {
     Assert.AreEqual(0, this.context.Feeds.Count());
     var feed = new AtomFeed("http://fake.com") { Owner = "Me" };
     this.context.Feeds.Add(feed);
     this.context.SaveChanges();
     Assert.AreEqual(1, this.context.Feeds.Count());
 }