From c988004762123e37a82fd2e8a2dfcfdefd1a5f3d Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 25 Mar 2020 17:18:36 +1100 Subject: [PATCH] fixes test --- .../Runtimes/CoreRuntimeTests.cs | 42 ++----------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs index 44481666bc..08640f827a 100644 --- a/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs +++ b/src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs @@ -136,48 +136,12 @@ namespace Umbraco.Tests.Runtimes return mock.Object; } - // FIXME: so how the f* should we do it now? - /* - // pretend we have the proper migration - // else BootFailedException because our mock IUmbracoDatabaseFactory does not provide databases - protected override bool EnsureUmbracoUpgradeState(IUmbracoDatabaseFactory databaseFactory) - { - return true; - } - */ - - //// because we don't even have the core runtime component, - //// there are a few required stuff that we need to compose - //public override void Compose(Composition composition) - //{ - // base.Compose(composition); - - // var scopeProvider = Mock.Of(); - // Mock.Get(scopeProvider) - // .Setup(x => x.CreateScope( - // It.IsAny(), - // It.IsAny(), - // It.IsAny(), - // It.IsAny(), - // It.IsAny(), - // It.IsAny())) - // .Returns(Mock.Of()); - - // composition.RegisterUnique(scopeProvider); - //} - - private IMainDom _mainDom; - public override IFactory Configure(IRegister container) { - var factory = base.Configure(container); - _mainDom = factory.GetInstance(); - return factory; - } + container.Register(Lifetime.Singleton); - public override void Terminate() - { - base.Terminate(); + var factory = base.Configure(container); + return factory; } // runs with only one single component