Example #1
0
        public override void Initialize()
        {
            base.Initialize();

            // need to specify a custom callback for unit tests
            // AutoPublishedContentTypes generates properties automatically
            var type = new AutoPublishedContentType(0, "anything", new PublishedPropertyType[] { });

            PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;
        }
Example #2
0
        public override void Initialize()
        {
            base.Initialize();

            // need to specify a custom callback for unit tests
            var propertyTypes = new[]
            {
                // AutoPublishedContentType will auto-generate other properties
                new PublishedPropertyType("content", 0, Constants.PropertyEditors.TinyMCEAlias),
            };
            var type = new AutoPublishedContentType(0, "anything", propertyTypes);

            PublishedContentType.GetPublishedContentTypeCallback = (alias) => type;

            var rCtx = GetRoutingContext("/test", 1234);

            UmbracoContext.Current = rCtx.UmbracoContext;
        }