Cleanup usages of Configs
This commit is contained in:
@@ -11,6 +11,7 @@ using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
using Umbraco.Core.Configuration.UmbracoSettings;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Persistence;
|
||||
@@ -29,6 +30,7 @@ using Umbraco.Tests.Testing;
|
||||
using Umbraco.Core.Migrations.Install;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Infrastructure.Configuration;
|
||||
using Umbraco.Persistance.SqlCe;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
using Umbraco.Web.WebApi;
|
||||
@@ -238,7 +240,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual IPublishedSnapshotService CreatePublishedSnapshotService()
|
||||
protected virtual IPublishedSnapshotService CreatePublishedSnapshotService(GlobalSettings globalSettings = null)
|
||||
{
|
||||
var cache = NoAppCache.Instance;
|
||||
|
||||
@@ -262,7 +264,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
Factory.GetInstance<IDocumentRepository>(), Factory.GetInstance<IMediaRepository>(), Factory.GetInstance<IMemberRepository>(),
|
||||
DefaultCultureAccessor,
|
||||
Logger,
|
||||
Factory.GetInstance<IGlobalSettings>(),
|
||||
globalSettings ?? TestObjects.GetGlobalSettings(),
|
||||
HostingEnvironment,
|
||||
HostingLifetime,
|
||||
ShortStringHelper,
|
||||
@@ -352,7 +354,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
}
|
||||
}
|
||||
|
||||
protected IUmbracoContext GetUmbracoContext(string url, int templateId = 1234, RouteData routeData = null, bool setSingleton = false, IGlobalSettings globalSettings = null, IPublishedSnapshotService snapshotService = null)
|
||||
protected IUmbracoContext GetUmbracoContext(string url, int templateId = 1234, RouteData routeData = null, bool setSingleton = false, GlobalSettings globalSettings = null, IPublishedSnapshotService snapshotService = null)
|
||||
{
|
||||
// ensure we have a PublishedCachesService
|
||||
var service = snapshotService ?? PublishedSnapshotService as XmlPublishedSnapshotService;
|
||||
@@ -376,7 +378,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
httpContextAccessor,
|
||||
service,
|
||||
Mock.Of<IWebSecurity>(),
|
||||
globalSettings ?? Factory.GetInstance<IGlobalSettings>(),
|
||||
globalSettings ?? new GlobalSettingsBuilder().Build(),
|
||||
HostingEnvironment,
|
||||
new TestVariationContextAccessor(),
|
||||
UriUtility,
|
||||
|
||||
Reference in New Issue
Block a user