mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing more UT
--HG-- branch : dev
This commit is contained in:
@@ -44,6 +44,7 @@ namespace Orchard.Core.Tests.Body {
|
|||||||
builder.RegisterType<DefaultContentQuery>().As<IContentQuery>();
|
builder.RegisterType<DefaultContentQuery>().As<IContentQuery>();
|
||||||
builder.RegisterType<BodyPartHandler>().As<IContentHandler>();
|
builder.RegisterType<BodyPartHandler>().As<IContentHandler>();
|
||||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||||
|
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@@ -49,6 +49,7 @@ namespace Orchard.Core.Tests.Common.Providers {
|
|||||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||||
builder.RegisterType<ShapeHelperFactory>().As<IShapeHelperFactory>();
|
builder.RegisterType<ShapeHelperFactory>().As<IShapeHelperFactory>();
|
||||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||||
|
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||||
|
|
||||||
_authn = new Mock<IAuthenticationService>();
|
_authn = new Mock<IAuthenticationService>();
|
||||||
_authz = new Mock<IAuthorizationService>();
|
_authz = new Mock<IAuthorizationService>();
|
||||||
|
@@ -59,6 +59,7 @@ namespace Orchard.Core.Tests.Routable.Services {
|
|||||||
builder.RegisterType<RoutePartHandler>().As<IContentHandler>();
|
builder.RegisterType<RoutePartHandler>().As<IContentHandler>();
|
||||||
|
|
||||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||||
|
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private IRoutableService _routableService;
|
private IRoutableService _routableService;
|
||||||
|
@@ -44,6 +44,7 @@ namespace Orchard.Core.Tests.Scheduling {
|
|||||||
builder.RegisterInstance(_handler).As<IScheduledTaskHandler>();
|
builder.RegisterInstance(_handler).As<IScheduledTaskHandler>();
|
||||||
|
|
||||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||||
|
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<Type> DatabaseTypes {
|
protected override IEnumerable<Type> DatabaseTypes {
|
||||||
|
@@ -47,6 +47,7 @@ namespace Orchard.Core.Tests.Scheduling {
|
|||||||
builder.RegisterType<ScheduledTaskManager>().As<IScheduledTaskManager>();
|
builder.RegisterType<ScheduledTaskManager>().As<IScheduledTaskManager>();
|
||||||
|
|
||||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||||
|
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<Type> DatabaseTypes {
|
protected override IEnumerable<Type> DatabaseTypes {
|
||||||
|
@@ -67,6 +67,7 @@ namespace Orchard.Tests.ContentManagement {
|
|||||||
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
|
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
|
||||||
|
|
||||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||||
|
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||||
|
|
||||||
_session = _sessionFactory.OpenSession();
|
_session = _sessionFactory.OpenSession();
|
||||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
|
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
|
||||||
|
@@ -73,6 +73,7 @@ namespace Orchard.Tests.ContentManagement {
|
|||||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||||
builder.RegisterType<ShapeHelperFactory>().As<IShapeHelperFactory>();
|
builder.RegisterType<ShapeHelperFactory>().As<IShapeHelperFactory>();
|
||||||
|
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||||
|
|
||||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||||
|
|
||||||
|
@@ -4,6 +4,7 @@ using System.Linq;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using Orchard.ContentManagement;
|
||||||
using Orchard.DisplayManagement.Descriptors;
|
using Orchard.DisplayManagement.Descriptors;
|
||||||
using Orchard.DisplayManagement.Implementation;
|
using Orchard.DisplayManagement.Implementation;
|
||||||
using Orchard.Environment.Extensions;
|
using Orchard.Environment.Extensions;
|
||||||
@@ -51,6 +52,8 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
|
|||||||
builder.RegisterType<TestShapeProvider>().As<IShapeTableProvider>()
|
builder.RegisterType<TestShapeProvider>().As<IShapeTableProvider>()
|
||||||
.As<TestShapeProvider>()
|
.As<TestShapeProvider>()
|
||||||
.InstancePerLifetimeScope();
|
.InstancePerLifetimeScope();
|
||||||
|
|
||||||
|
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||||
}
|
}
|
||||||
|
|
||||||
static Feature Feature(FeatureDescriptor descriptor) {
|
static Feature Feature(FeatureDescriptor descriptor) {
|
||||||
|
Reference in New Issue
Block a user