diff --git a/src/Umbraco.Core/Services/ServiceContext.cs b/src/Umbraco.Core/Services/ServiceContext.cs index d04a396666..bf1a7e77e5 100644 --- a/src/Umbraco.Core/Services/ServiceContext.cs +++ b/src/Umbraco.Core/Services/ServiceContext.cs @@ -65,6 +65,7 @@ namespace Umbraco.Core.Services /// /// /// + /// public ServiceContext( IContentService contentService = null, IMediaService mediaService = null, @@ -86,7 +87,8 @@ namespace Umbraco.Core.Services ILocalizedTextService localizedTextService = null, IAuditService auditService = null, IDomainService domainService = null, - ITaskService taskService = null) + ITaskService taskService = null, + IMacroService macroService = null) { if (auditService != null) _auditService = new Lazy(() => auditService); if (localizedTextService != null) _localizedTextService = new Lazy(() => localizedTextService); @@ -109,6 +111,7 @@ namespace Umbraco.Core.Services if (notificationService != null) _notificationService = new Lazy(() => notificationService); if (domainService != null) _domainService = new Lazy(() => domainService); if (taskService != null) _taskService = new Lazy(() => taskService); + if (macroService != null) _macroService = new Lazy(() => macroService); } internal ServiceContext( diff --git a/src/Umbraco.Tests/Routing/UrlRoutingTestBase.cs b/src/Umbraco.Tests/Routing/UrlRoutingTestBase.cs index 089f78ac3e..295bb695e5 100644 --- a/src/Umbraco.Tests/Routing/UrlRoutingTestBase.cs +++ b/src/Umbraco.Tests/Routing/UrlRoutingTestBase.cs @@ -34,7 +34,7 @@ namespace Umbraco.Tests.Routing protected ServiceContext GetServiceContext(IUmbracoSettingsSection umbracoSettings, ILogger logger) { //get the mocked service context to get the mocked domain service - var svcCtx = MockHelper.GetMockedServiceContext(umbracoSettings, logger); + var svcCtx = MockHelper.GetMockedServiceContext(); var domainService = Mock.Get(svcCtx.DomainService); //setup mock domain service domainService.Setup(service => service.GetAll(It.IsAny())) diff --git a/src/Umbraco.Tests/TestHelpers/MockHelper.cs b/src/Umbraco.Tests/TestHelpers/MockHelper.cs index c95b9fc8c2..f81c7439d7 100644 --- a/src/Umbraco.Tests/TestHelpers/MockHelper.cs +++ b/src/Umbraco.Tests/TestHelpers/MockHelper.cs @@ -33,7 +33,9 @@ namespace Umbraco.Tests.TestHelpers new Mock().Object, new Mock().Object, new Mock().Object, - new Mock().Object); + new Mock().Object, + new Mock().Object, + new Mock().Object); } } } \ No newline at end of file