Fixing more UT

--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2010-10-14 11:26:42 -07:00
parent 5eefacfb10
commit 1e5ef6fc3e
8 changed files with 10 additions and 0 deletions

View File

@@ -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]

View File

@@ -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>();

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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>();

View File

@@ -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>();

View File

@@ -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) {