Fixing unit tests

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-11-23 13:03:30 -08:00
parent 3c2b6c6111
commit 1621a10cc8
6 changed files with 23 additions and 0 deletions

View File

@@ -9,12 +9,14 @@ using Orchard.Commands;
using Orchard.Data;
using Orchard.Data.Migration.Generator;
using Orchard.Data.Providers;
using Orchard.Environment;
using Orchard.Environment.Configuration;
using Orchard.Environment.Extensions;
using Orchard.Environment.ShellBuilders;
using Orchard.Environment.ShellBuilders.Models;
using Orchard.FileSystems.AppData;
using Orchard.Localization;
using Orchard.Tests.Environment;
using Orchard.Tests.FileSystems.AppData;
using Orchard.Tests.Stubs;
@@ -49,6 +51,7 @@ namespace Orchard.Tests.Modules.CodeGeneration.Commands {
builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
builder.RegisterType<SchemaCommandGenerator>().As<ISchemaCommandGenerator>();
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
builder.RegisterType<StubHostEnvironment>().As<IHostEnvironment>();
_container = builder.Build();
_extensionManager = _container.Resolve<IExtensionManager>();

View File

@@ -32,6 +32,8 @@ using Orchard.Tests.FileSystems.AppData;
using Orchard.Tests.Modules.Migrations.Orchard.Tests.DataMigration.Records;
using Path = Bleroy.FluentPath.Path;
using Orchard.Tests.Stubs;
using Orchard.Tests.Environment;
using Orchard.Environment;
namespace Orchard.Tests.Modules.Migrations {
[TestFixture]
@@ -85,6 +87,7 @@ namespace Orchard.Tests.Modules.Migrations {
builder.RegisterType<SchemaCommandGenerator>().As<ISchemaCommandGenerator>();
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
builder.RegisterType<StubHostEnvironment>().As<IHostEnvironment>();
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();