diff --git a/src/Orchard.Tests.Modules/Themes/Services/ThemeServiceTests.cs b/src/Orchard.Tests.Modules/Themes/Services/ThemeServiceTests.cs index 7cc9a531a..b7fe2f28b 100644 --- a/src/Orchard.Tests.Modules/Themes/Services/ThemeServiceTests.cs +++ b/src/Orchard.Tests.Modules/Themes/Services/ThemeServiceTests.cs @@ -68,6 +68,7 @@ namespace Orchard.Tests.Modules.Themes.Services { var context = new DynamicProxyContext(); var builder = new ContainerBuilder(); builder.RegisterModule(new SettingsModule()); + builder.RegisterType().As(); // test builder.RegisterType().EnableDynamicProxy(context).As(); builder.RegisterType().As(); builder.RegisterType().As(); diff --git a/src/Orchard.Tests/Orchard.Framework.Tests.csproj b/src/Orchard.Tests/Orchard.Framework.Tests.csproj index 801976249..ae856e317 100644 --- a/src/Orchard.Tests/Orchard.Framework.Tests.csproj +++ b/src/Orchard.Tests/Orchard.Framework.Tests.csproj @@ -244,6 +244,7 @@ + diff --git a/src/Orchard.Tests/Stubs/StubWorkContextAccessor.cs b/src/Orchard.Tests/Stubs/StubWorkContextAccessor.cs new file mode 100644 index 000000000..bfa66084b --- /dev/null +++ b/src/Orchard.Tests/Stubs/StubWorkContextAccessor.cs @@ -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(); + } + } +}