Remove the crazy Func param on AddUmbracoCore

This commit is contained in:
Paul Johnson
2020-11-20 11:11:52 +00:00
parent 4520b2ab21
commit 5b1ccb0659
8 changed files with 240 additions and 242 deletions

View File

@@ -1,11 +1,10 @@
using System;
using Moq;
using Umbraco.Core;
using Umbraco.Core.Builder;
using Umbraco.Core.Cache;
using Umbraco.Core.Runtime;
using Umbraco.Extensions;
using Umbraco.Tests.Integration.Implementations;
using Umbraco.Tests.Integration.Testing;
using Umbraco.Web.Common.Builder;
namespace Umbraco.Tests.Integration.TestServerTest
{
@@ -18,30 +17,17 @@ namespace Umbraco.Tests.Integration.TestServerTest
/// <returns></returns>
public static IUmbracoBuilder AddTestCore(this IUmbracoBuilder builder, TestHelper testHelper)
{
return builder.AddUmbracoCore(
builder.AddUmbracoCore(
testHelper.GetWebHostEnvironment(),
typeof(UmbracoBuilderExtensions).Assembly,
AppCaches.NoCache, // Disable caches in integration tests
testHelper.GetLoggingConfiguration(),
builder.Config,
// TODO: Yep that's extremely ugly
(lambdaBuilder, globalSettings, connectionStrings, umbVersion, ioHelper, profiler, hostingEnv, typeFinder, appCaches, dbProviderFactoryCreator) =>
{
UmbracoIntegrationTest.ConfigureSomeMorebitsForTests(
lambdaBuilder,
globalSettings,
connectionStrings,
umbVersion,
ioHelper,
profiler,
hostingEnv,
typeFinder,
appCaches,
dbProviderFactoryCreator,
testHelper.MainDom); // SimpleMainDom
});
builder.Config);
builder.Services.AddUnique<IUmbracoBootPermissionChecker>(Mock.Of<IUmbracoBootPermissionChecker>());
builder.Services.AddUnique<IMainDom>(testHelper.MainDom);
return builder;
}
}
}