mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Refactoring how default page classes are injected
--HG-- branch : 1.x
This commit is contained in:
@@ -23,6 +23,7 @@ using Orchard.Environment.Extensions;
|
||||
using Orchard.Security;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.UI.PageClass;
|
||||
|
||||
namespace Orchard.Tests.Modules.Comments.Services {
|
||||
[TestFixture]
|
||||
@@ -49,6 +50,7 @@ namespace Orchard.Tests.Modules.Comments.Services {
|
||||
builder.RegisterType<CommentPartHandler>().As<IContentHandler>();
|
||||
builder.RegisterType<CommonPartHandler>().As<IContentHandler>();
|
||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterInstance(new Mock<IPageClassBuilder>().Object);
|
||||
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ using Orchard.Messaging.Services;
|
||||
using Orchard.Security;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.Tests.Utility;
|
||||
using Orchard.UI.PageClass;
|
||||
using Orchard.Users.Handlers;
|
||||
using Orchard.Users.Models;
|
||||
using Orchard.Users.Services;
|
||||
@@ -84,6 +85,7 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterInstance(new Mock<IPageClassBuilder>().Object);
|
||||
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
|
||||
@@ -25,6 +25,7 @@ using Orchard.Security;
|
||||
using Orchard.Security.Providers;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.Tests.Utility;
|
||||
using Orchard.UI.PageClass;
|
||||
using Orchard.Users.Handlers;
|
||||
using Orchard.Users.Models;
|
||||
using Orchard.Users.Services;
|
||||
@@ -96,6 +97,7 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterInstance(new Mock<IPageClassBuilder>().Object);
|
||||
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||
|
||||
builder.RegisterType<DefaultEncryptionService>().As<IEncryptionService>();
|
||||
|
||||
@@ -21,6 +21,7 @@ using Orchard.Environment.Features;
|
||||
using Orchard.Security;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.UI.PageClass;
|
||||
using Orchard.Widgets.Models;
|
||||
using Orchard.Widgets.Services;
|
||||
|
||||
@@ -103,6 +104,7 @@ namespace Orchard.Tests.Modules.Widgets.Services {
|
||||
builder.RegisterType<StubWidgetPartHandler>().As<IContentHandler>();
|
||||
builder.RegisterType<StubLayerPartHandler>().As<IContentHandler>();
|
||||
builder.RegisterType<DefaultContentQuery>().As<IContentQuery>();
|
||||
builder.RegisterInstance(new Mock<IPageClassBuilder>().Object);
|
||||
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user