Exemplo n.º 1
0
 public void ItemCallback(Content item)
 {
     callbackFired = true;
     Assert.AreEqual("tv-and-radio/2010/apr/10/charlie-brooker-mad-men-screenburn", item.Id);
     //Assert.AreEqual("article", item.Type);
     Assert.AreEqual("Charlie Brooker", item.Fields.Byline);
     Assert.AreEqual(8, item.Tags.Count());
     Assert.AreEqual(2010, item.WebPublicationDate.Year);
 }
 protected Review ConvertSearchResult(Content c)
 {
     Review r = null;
     switch(c.SectionId)
     {
         case "music":
             r = new MusicReview();
             ((MusicReview)r).MusicType = GetMusicType
     }
 }
 public void TestGetReviewTypeFromTag()
 {
     var content = new Content
                       {
                           Tags = new[]
                                      {
                                          new Tag {Id = "books/books"}
                                      }
                       };
     content.GetReviewType().ShouldBe(ReviewTypes.Books);
 }
 public void Test_content_equality()
 {
     Content t1 = new Content { Id = "1" };
     Content t2 = new Content { Id = "1" };
     Content t3 = new Content { Id = "2" };
     Content t4 = t3;
     Assert.AreEqual(t1, t2);
     Assert.AreNotEqual(t1, t3);
     Assert.AreNotSame(t1, t2);
     Assert.AreSame(t3, t4);
 }
 public void Convert(Content content, ref Review review)
 {
 }