public void Children_Of_Type_Test() { var doc = GetNode(1); var currentContent = ContentTypeMapper.Map <Home>(doc); var result = currentContent.ChildrenOfType <NewsLandingPage>().ToArray(); Assert.AreEqual("page2/alias, 2ndpagealias", result[0].PageTitle); }
public void Type_Test() { var doc = GetNode(1); var currentContent = ContentTypeMapper.Map <Home>(doc); Assert.That(currentContent.SiteName, Is.EqualTo("Test site")); Assert.That(currentContent.SiteDescription, Is.EqualTo("this is a test site")); }
public void Descendants_Of_Type_Test() { var doc = GetNode(1); var currentContent = ContentTypeMapper.Map <Home>(doc); var result = currentContent.Descendants <NewsArticle>().ToArray(); Assert.AreEqual("John doe", result[0].ArticleAuthor); Assert.AreEqual("John Smith", result[1].ArticleAuthor); }