Current.Container abstracted. Builds, but fails for collection builder tests.
This commit is contained in:
@@ -8,6 +8,7 @@ using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Composing.LightInject;
|
||||
using Umbraco.Core.Configuration.UmbracoSettings;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models;
|
||||
@@ -43,7 +44,7 @@ namespace Umbraco.Tests.Web
|
||||
container.Setup(x => x.GetInstance(typeof(TypeLoader))).Returns(
|
||||
new TypeLoader(NullCacheProvider.Instance, SettingsForTests.GenerateMockGlobalSettings(), new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>())));
|
||||
container.Setup(x => x.GetInstance(typeof (ServiceContext))).Returns(serviceContext);
|
||||
Current.Container = container.Object;
|
||||
Current.Container = new ContainerAdapter(container.Object);
|
||||
|
||||
Umbraco.Web.Composing.Current.UmbracoContextAccessor = new TestUmbracoContextAccessor();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user