private MicroServicesPublishingPageData BuildBasePageData(PageNode pageNode, PageData pageData)
 {
     return(new MicroServicesPublishingPageData()
     {
         CanonicalName = sitefinityPageNodeProxy.GetPageName(pageNode).ToLower(),
         IncludeInSiteMap = pageNode.Crawlable,
         AlternativeNames = GetPageURLs(pageNode),
         LastModified = pageData.LastModified,
         ContentPageId = pageNode.Id,
         Category = pageNode.Parent.Title != Digital.Core.Constants.Pages ? pageNode.Parent.UrlName : pageNode.UrlName,
         BreadcrumbTitle = GetBreadcrumbData(pageNode, pageData),
         Description = sitefinityPageDataProxy.GetDescription(pageData),
         Keywords = sitefinityPageDataProxy.GetKeywords(pageData),
         Title = sitefinityPageDataProxy.GetHtmlTitle(pageData)
     });
 }
示例#2
0
        private void SetUpData(bool isCrawlable)
        {
            //SetUp
            var dummyGuid = Guid.NewGuid();

            dummyPageNode.Id        = dummyGuid;
            dummyPageNode.Crawlable = isCrawlable;
            dummyPageNode.Urls.Add(new PageUrlData()
            {
                Url = DummyUrl
            });
            dummyPageData.NavigationNode = dummyPageNode;

            A.CallTo(() => fakeSitefinityManagerProxy.GetPageNode(A <Type> ._, A <Guid> ._, A <string> ._)).Returns(dummyPageNode);
            A.CallTo(() => fakeSitefinityPageNodeProxy.GetPageName(A <PageNode> ._)).Returns(nameof(PageNode.UrlName));
            A.CallTo(() => fakeSitefinityPageNodeProxy.GetLastPublishedDate(A <PageNode> ._)).Returns(dummyPublishedDate);

            A.CallTo(() => fakeSitefinityManagerProxy.GetPageData(A <Type> ._, A <Guid> ._, A <string> ._)).Returns(dummyPageData);
            A.CallTo(() => fakeSitefinityManagerProxy.GetPageDataByName(A <string> ._)).Returns(dummyPageData);
            A.CallTo(() => fakeSitefinityPageDataProxy.GetDescription(A <PageData> ._)).Returns(nameof(PageData.Description));
            A.CallTo(() => fakeSitefinityPageDataProxy.GetKeywords(A <PageData> ._)).Returns(nameof(PageData.Keywords));
            A.CallTo(() => fakeSitefinityPageDataProxy.GetHtmlTitle(A <PageData> ._)).Returns(nameof(PageData.HtmlTitle));
            A.CallTo(() => fakeSitefinityPageDataProxy.GetTitle(A <PageData> ._)).Returns(nameof(PageData.NavigationNode.Title));
        }