Esempio n. 1
0
        internal IPublishedContent GetNode(int id)
        {
            var ctx          = GetUmbracoContext("/test", 1234);
            var contentStore = new DefaultPublishedContentStore();
            var doc          = contentStore.GetDocumentById(ctx, id);

            Assert.IsNotNull(doc);
            return(doc);
        }
Esempio n. 2
0
        internal DynamicPublishedContent GetNode(int id)
        {
            //var template = Template.MakeNew("test", new User(0));
            //var ctx = GetUmbracoContext("/test", template.Id);
            var ctx          = GetUmbracoContext("/test", 1234);
            var contentStore = new DefaultPublishedContentStore();
            var doc          = contentStore.GetDocumentById(ctx, id);

            Assert.IsNotNull(doc);
            var dynamicNode = new DynamicPublishedContent(doc);

            Assert.IsNotNull(dynamicNode);
            return(dynamicNode);
        }