Fixing event subscription which caused a series of unit tests to fail
This commit is contained in:
@@ -9,7 +9,6 @@ using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.ObjectResolution;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
using Umbraco.Tests.Stubs;
|
||||
using Umbraco.Web;
|
||||
using Umbraco.Web.Routing;
|
||||
@@ -33,11 +32,6 @@ namespace Umbraco.Tests.TestHelpers
|
||||
string path = TestHelper.CurrentAssemblyDirectory;
|
||||
AppDomain.CurrentDomain.SetData("DataDirectory", path);
|
||||
|
||||
Resolution.Freeze();
|
||||
ApplicationContext = new ApplicationContext() { IsReady = true };
|
||||
ServiceContext = ServiceContext.Current;
|
||||
DatabaseContext = new DatabaseContext();
|
||||
|
||||
//we need to clear out all currently created template files
|
||||
var masterPages = new DirectoryInfo(IOHelper.MapPath(SystemDirectories.Masterpages));
|
||||
masterPages.GetFiles().ForEach(x => x.Delete());
|
||||
@@ -58,6 +52,11 @@ namespace Umbraco.Tests.TestHelpers
|
||||
var engine = new SqlCeEngine(settings.ConnectionString);
|
||||
engine.CreateDatabase();
|
||||
|
||||
Resolution.Freeze();
|
||||
ApplicationContext = new ApplicationContext() { IsReady = true };
|
||||
ServiceContext = ServiceContext.Current;
|
||||
DatabaseContext = new DatabaseContext();
|
||||
|
||||
//Configure the Database and Sql Syntax based on connection string set in config
|
||||
DatabaseContext.Initialize();
|
||||
//Create the umbraco database and its base data
|
||||
|
||||
Reference in New Issue
Block a user