Fixing unit tests

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros 2013-07-08 11:44:21 -07:00
parent 8d775ab93f
commit 0ccc2743ad
4 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@ using Autofac;
using NHibernate;
using NUnit.Framework;
using Orchard.Data;
using Orchard.Environment.Configuration;
using Orchard.Services;
using Orchard.Tests.Data;
using Orchard.Tests.Stubs;
@ -47,6 +48,7 @@ namespace Orchard.Tests.Modules {
builder.RegisterInstance(new StubLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(_clock).As<IClock>();
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataProvider = "SqlCe" });
Register(builder);
_container = builder.Build();

View File

@ -11,6 +11,7 @@ using Orchard.ContentManagement.Handlers;
using Orchard.ContentManagement.Records;
using Orchard.Data;
using Orchard.Environment;
using Orchard.Environment.Configuration;
using Orchard.Security;
using Orchard.Tags.Handlers;
using Orchard.Tags.Models;

View File

@ -18,6 +18,7 @@ using Orchard.DisplayManagement;
using Orchard.DisplayManagement.Descriptors;
using Orchard.DisplayManagement.Implementation;
using Orchard.Environment;
using Orchard.Environment.Configuration;
using Orchard.Environment.Extensions;
using Orchard.Messaging.Events;
using Orchard.Messaging.Services;
@ -78,6 +79,7 @@ namespace Orchard.Tests.Modules.Users.Services {
builder.RegisterType(typeof(SettingsFormatter)).As<ISettingsFormatter>();
builder.RegisterType<ContentDefinitionManager>().As<IContentDefinitionManager>();
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataProvider = "SqlCe" });
builder.RegisterType<UserPartHandler>().As<IContentHandler>();
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
builder.RegisterType<OrchardServices>().As<IOrchardServices>();

View File

@ -7,6 +7,7 @@ using Autofac;
using NHibernate;
using NUnit.Framework;
using Orchard.Data;
using Orchard.Environment.Configuration;
using Orchard.Services;
using Orchard.Tests.Data;
using Orchard.Tests.Stubs;
@ -43,6 +44,8 @@ namespace Orchard.Tests {
builder.RegisterInstance(new StubLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(_clock).As<IClock>();
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataProvider = "SqlCe" });
Register(builder);
_container = builder.Build();
}