Decoupling more things, mostly to do with the PluginManager and logging which now requires an IServiceProvider so have created a simple instance of that.
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
using NUnit.Framework;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.ObjectResolution;
|
||||
using Umbraco.Core.Persistence.Mappers;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
using Umbraco.Core.Profiling;
|
||||
|
||||
namespace Umbraco.Tests.TestHelpers
|
||||
{
|
||||
@@ -12,9 +16,13 @@ namespace Umbraco.Tests.TestHelpers
|
||||
[SetUp]
|
||||
public virtual void Initialize()
|
||||
{
|
||||
var logger = new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>());
|
||||
SqlSyntaxContext.SqlSyntaxProvider = new SqlCeSyntaxProvider();
|
||||
PluginManager.Current = new PluginManager(false);
|
||||
PluginManager.Current = new PluginManager(new ActivatorServiceProvider(), new NullCacheProvider(),
|
||||
logger,
|
||||
false);
|
||||
MappingResolver.Current = new MappingResolver(
|
||||
new ActivatorServiceProvider(), logger.Logger,
|
||||
() => PluginManager.Current.ResolveAssignedMapperTypes());
|
||||
|
||||
Resolution.Freeze();
|
||||
|
||||
Reference in New Issue
Block a user