Content manager assigning values to definition properties

DefaultContentManager now takes a dependency on IContentDefinitionManager
ContentItem.TypeDefinition assigned to ContentTypeDefinition instance when creating
ContentPart.TypePartDefinition assigned to ContentTypeDefinition.Part instance as added
Empty definition instances are created as code-only types and parts are created

--HG--
branch : dev
This commit is contained in:
Louis DeJardin
2010-06-08 12:05:29 -07:00
parent 1b39eb3bc0
commit 57e830f19e
19 changed files with 137 additions and 41 deletions

View File

@@ -1,7 +1,9 @@
using System.Linq;
using Autofac;
using Moq;
using NHibernate;
using NUnit.Framework;
using Orchard.ContentManagement.MetaData;
using Orchard.Data;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;
@@ -44,6 +46,7 @@ namespace Orchard.Tests.ContentManagement {
builder.RegisterModule(new ContentModule());
builder.RegisterType<DefaultContentManager>().As<IContentManager>().SingleInstance();
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
builder.RegisterType<AlphaHandler>().As<IContentHandler>();
builder.RegisterType<BetaHandler>().As<IContentHandler>();