mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
Fix ThemeServiceTests
--HG-- branch : dev
This commit is contained in:
@@ -68,6 +68,7 @@ namespace Orchard.Tests.Modules.Themes.Services {
|
||||
var context = new DynamicProxyContext();
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterModule(new SettingsModule());
|
||||
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>(); // test
|
||||
builder.RegisterType<ThemeService>().EnableDynamicProxy(context).As<IThemeService>();
|
||||
builder.RegisterType<SettingsModuleInterceptor>().As<ISettingsModuleInterceptor>();
|
||||
builder.RegisterType<SiteService>().As<ISiteService>();
|
||||
|
@@ -244,6 +244,7 @@
|
||||
<Compile Include="Mvc\Routes\UrlPrefixTests.cs" />
|
||||
<Compile Include="Records\BigRecord.cs" />
|
||||
<Compile Include="Scripting\ScriptingTests.cs" />
|
||||
<Compile Include="Stubs\StubWorkContextAccessor.cs" />
|
||||
<Compile Include="Stubs\StubExtensionManager.cs" />
|
||||
<Compile Include="Stubs\StubReportsCoordinator.cs" />
|
||||
<Compile Include="Stubs\StubVirtualPathProvider.cs" />
|
||||
|
22
src/Orchard.Tests/Stubs/StubWorkContextAccessor.cs
Normal file
22
src/Orchard.Tests/Stubs/StubWorkContextAccessor.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Web;
|
||||
|
||||
namespace Orchard.Tests.Stubs {
|
||||
public class StubWorkContextAccessor : IWorkContextAccessor {
|
||||
public WorkContext GetContext(HttpContextBase httpContext) {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public IWorkContextScope CreateWorkContextScope(HttpContextBase httpContext) {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public WorkContext GetContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public IWorkContextScope CreateWorkContextScope() {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user