mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Fixing unit tests
--HG-- branch : dev
This commit is contained in:
@@ -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>();
|
||||
|
@@ -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>();
|
||||
|
Reference in New Issue
Block a user