Example #1
0
        public void SchemaPartBuilder_CanCreateAttributeTypes_UsingCurrentRegistry()
        {
            AttributeTypeRegistry.SetCurrent(new CmsAttributeTypeRegistry());
            var innerBuilder = new BuilderStarter <AttributeType, IContentStore>(Hive);
            var type         = innerBuilder.UseExistingType("richTextEditor");

            Assert.NotNull(type);
            Assert.That(type.Item, Is.Not.Null);
        }
Example #2
0
        public void SchemaPartBuilder_CanCreateAttributeTypes_UsingSpecificRegistry()
        {
            var    registry     = new CmsAttributeTypeRegistry();
            string key          = "richTextEditor";
            var    theRealType  = registry.GetAttributeType(key);
            var    innerBuilder = new BuilderStarter <AttributeType, IContentStore>(Hive);
            var    type         = innerBuilder.UseExistingType(registry, key);

            Assert.NotNull(type);
            Assert.That(type.Item, Is.Not.Null);
            Assert.That(type.Item.Alias, Is.EqualTo(theRealType.Alias));
            Assert.That(type.Item.Id, Is.EqualTo(theRealType.Id));
        }