Fixing build and weird protected fields in UmbracoIntegrationTest
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Tests.Benchmarks.Config;
|
||||
|
||||
namespace Umbraco.Tests.Benchmarks
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
@@ -8,7 +8,6 @@ using BenchmarkDotNet.Diagnosers;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using Perfolizer.Horology;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Tests.Benchmarks
|
||||
{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Text;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Tests.Benchmarks.Config;
|
||||
|
||||
namespace Umbraco.Tests.Benchmarks
|
||||
|
||||
@@ -88,8 +88,8 @@ namespace Umbraco.Cms.Tests.Integration.Testing
|
||||
}
|
||||
|
||||
_testTeardown = null;
|
||||
FirstTestInFixture = false;
|
||||
FirstTestInSession = false;
|
||||
_firstTestInFixture = false;
|
||||
s_firstTestInSession = false;
|
||||
|
||||
// Ensure CoreRuntime stopped (now it's a HostedService)
|
||||
IHost host = Services.GetRequiredService<IHost>();
|
||||
@@ -103,7 +103,7 @@ namespace Umbraco.Cms.Tests.Integration.Testing
|
||||
|
||||
[SetUp]
|
||||
public virtual void SetUp_Logging() =>
|
||||
TestContext.Progress.Write($"Start test {TestCount++}: {TestContext.CurrentContext.Test.Name}");
|
||||
TestContext.Progress.Write($"Start test {s_testCount++}: {TestContext.CurrentContext.Test.Name}");
|
||||
|
||||
[SetUp]
|
||||
public virtual void Setup()
|
||||
@@ -245,7 +245,6 @@ namespace Umbraco.Cms.Tests.Integration.Testing
|
||||
{
|
||||
if (TestOptions.Boot)
|
||||
{
|
||||
Services.GetRequiredService<IBackOfficeSecurityFactory>().EnsureBackOfficeSecurity();
|
||||
Services.GetRequiredService<IUmbracoContextFactory>().EnsureUmbracoContext();
|
||||
}
|
||||
|
||||
@@ -348,7 +347,7 @@ namespace Umbraco.Cms.Tests.Integration.Testing
|
||||
// Only attach schema once per fixture
|
||||
// Doing it more than once will block the process since the old db hasn't been detached
|
||||
// and it would be the same as NewSchemaPerTest even if it didn't block
|
||||
if (FirstTestInFixture)
|
||||
if (_firstTestInFixture)
|
||||
{
|
||||
// New DB + Schema
|
||||
TestDbMeta newSchemaFixtureDbMeta = db.AttachSchema();
|
||||
@@ -365,7 +364,7 @@ namespace Umbraco.Cms.Tests.Integration.Testing
|
||||
// Only attach schema once per fixture
|
||||
// Doing it more than once will block the process since the old db hasn't been detached
|
||||
// and it would be the same as NewSchemaPerTest even if it didn't block
|
||||
if (FirstTestInFixture)
|
||||
if (_firstTestInFixture)
|
||||
{
|
||||
// New DB + Schema
|
||||
TestDbMeta newEmptyFixtureDbMeta = db.AttachEmpty();
|
||||
@@ -438,12 +437,11 @@ namespace Umbraco.Cms.Tests.Integration.Testing
|
||||
|
||||
protected IMapperCollection Mappers => Services.GetRequiredService<IMapperCollection>();
|
||||
|
||||
protected UserBuilder UserBuilderInstance = new UserBuilder();
|
||||
protected UserGroupBuilder UserGroupBuilderInstance = new UserGroupBuilder();
|
||||
protected UserBuilder UserBuilderInstance { get; } = new UserBuilder();
|
||||
protected UserGroupBuilder UserGroupBuilderInstance { get; } = new UserGroupBuilder();
|
||||
|
||||
protected static bool FirstTestInSession = true;
|
||||
|
||||
protected bool FirstTestInFixture = true;
|
||||
protected static int TestCount = 1;
|
||||
private static bool s_firstTestInSession = true;
|
||||
private bool _firstTestInFixture = true;
|
||||
private static int s_testCount = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Web.Scheduling
|
||||
{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Web.Scheduling
|
||||
{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Scheduling;
|
||||
|
||||
namespace Umbraco.Tests.LegacyXmlPublishedCache
|
||||
|
||||
@@ -38,7 +38,6 @@ using Umbraco.Cms.Infrastructure.Migrations.Install;
|
||||
using Umbraco.Cms.Infrastructure.Persistence;
|
||||
using Umbraco.Cms.Persistence.SqlCe;
|
||||
using Umbraco.Cms.Tests.Common;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Extensions;
|
||||
using Umbraco.Web;
|
||||
using Umbraco.Web.Hosting;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
@@ -6,7 +6,6 @@ using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web;
|
||||
|
||||
namespace Umbraco.Tests.Web
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System.Web;
|
||||
using Umbraco.Cms.Core.Net;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Web
|
||||
{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System.Web.Routing;
|
||||
using System.Web.Routing;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Models.PublishedContent;
|
||||
using Umbraco.Cms.Core.Web;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
|
||||
namespace Umbraco.Web.Runtime
|
||||
{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Umbraco.Cms.Core.Logging;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Runtime;
|
||||
using ConnectionStrings = Umbraco.Cms.Core.Configuration.Models.ConnectionStrings;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ using Umbraco.Cms.Infrastructure.Migrations.Install;
|
||||
using Umbraco.Cms.Infrastructure.Persistence;
|
||||
using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax;
|
||||
using Umbraco.Cms.Persistence.SqlCe;
|
||||
using Umbraco.Core;
|
||||
using Constants = Umbraco.Cms.Core.Constants;
|
||||
|
||||
namespace Umbraco.Web
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Web.Http;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Controllers;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Core;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Umbraco.Cms.Core.Features;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Net.Http;
|
||||
using System.Web;
|
||||
using Microsoft.Owin;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Web.WebApi
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user