Fixes failing unit tests due to not resetting Resolution before resetting the actual resolver classes. Now it is automatically impllied that
when you Reset a resolver class, Resolution is un-frozen.
This commit is contained in:
@@ -63,13 +63,14 @@ namespace Umbraco.Tests.TestHelpers
|
||||
var engine = new SqlCeEngine(settings.ConnectionString);
|
||||
engine.CreateDatabase();
|
||||
|
||||
Resolution.Freeze();
|
||||
ApplicationContext.Current = new ApplicationContext(
|
||||
//assign the db context
|
||||
new DatabaseContext(new DefaultDatabaseFactory()),
|
||||
//assign the service context
|
||||
new ServiceContext(new PetaPocoUnitOfWorkProvider(), new FileUnitOfWorkProvider(), new PublishingStrategy())) { IsReady = true };
|
||||
|
||||
|
||||
Resolution.Freeze();
|
||||
|
||||
//Configure the Database and Sql Syntax based on connection string set in config
|
||||
DatabaseContext.Initialize();
|
||||
//Create the umbraco database and its base data
|
||||
@@ -90,7 +91,6 @@ namespace Umbraco.Tests.TestHelpers
|
||||
SqlCeContextGuardian.CloseBackgroundConnection();
|
||||
|
||||
ApplicationContext.Current = null;
|
||||
Resolution.Reset();
|
||||
RepositoryResolver.Reset();
|
||||
|
||||
TestHelper.CleanContentDirectories();
|
||||
|
||||
Reference in New Issue
Block a user