Cleanup AddUmbraco & AddUmbracoCore
This commit is contained in:
@@ -5,6 +5,7 @@ using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Runtime;
|
||||
using Umbraco.Extensions;
|
||||
using Umbraco.Tests.Integration.Implementations;
|
||||
using Umbraco.Web.Common.Builder;
|
||||
|
||||
namespace Umbraco.Tests.Integration.TestServerTest
|
||||
{
|
||||
@@ -17,11 +18,7 @@ namespace Umbraco.Tests.Integration.TestServerTest
|
||||
/// <returns></returns>
|
||||
public static IUmbracoBuilder AddTestCore(this IUmbracoBuilder builder, TestHelper testHelper)
|
||||
{
|
||||
builder.AddUmbracoCore(
|
||||
testHelper.GetWebHostEnvironment(),
|
||||
typeof(UmbracoBuilderExtensions).Assembly,
|
||||
testHelper.GetLoggingConfiguration(),
|
||||
builder.Config);
|
||||
builder.AddUmbracoCore();
|
||||
|
||||
builder.Services.AddUnique<AppCaches>(AppCaches.NoCache);
|
||||
|
||||
|
||||
@@ -130,9 +130,12 @@ namespace Umbraco.Tests.Integration.TestServerTest
|
||||
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
var umbracoBuilder = services.AddUmbraco(TestHelper.GetWebHostEnvironment(), Configuration, assembly: GetType().Assembly);
|
||||
var typeLoader = services.AddTypeLoader(GetType().Assembly, TestHelper.GetWebHostEnvironment(),
|
||||
TestHelper.ConsoleLoggerFactory, AppCaches.NoCache, Configuration);
|
||||
|
||||
var builder = new UmbracoBuilder(services, Configuration, typeLoader);
|
||||
|
||||
umbracoBuilder
|
||||
builder
|
||||
.AddConfiguration()
|
||||
.AddTestCore(TestHelper) // This is the important one!
|
||||
.AddWebComponents()
|
||||
|
||||
Reference in New Issue
Block a user