Changes to allow using container from third party tests

This commit is contained in:
Lars-Erik Aabech
2018-09-09 20:05:06 +02:00
parent 1198191e05
commit b4b09bc116
3 changed files with 7 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ namespace Umbraco.Core.Composing
/// <summary>
/// Gets or sets the DI container.
/// </summary>
internal static IContainer Container
public static IContainer Container
{
get
{

View File

@@ -34,6 +34,8 @@ namespace Umbraco.Tests.TestHelpers
var container = Current.Container = ContainerFactory.Create();
PreSetUp();
container.RegisterSingleton<ILogger>(factory => Mock.Of<ILogger>());
container.RegisterSingleton<IProfiler>(factory => Mock.Of<IProfiler>());
@@ -55,6 +57,9 @@ namespace Umbraco.Tests.TestHelpers
SetUp();
}
public virtual void PreSetUp()
{}
public virtual void SetUp()
{}

View File

@@ -54,7 +54,7 @@ namespace Umbraco.Web.Composing
/// <summary>
/// Gets the DI container.
/// </summary>
internal static IContainer Container
public static IContainer Container
=> CoreCurrent.Container;
#region Temp & Special