had some strange issues with unit tests, added error checks.
This commit is contained in:
@@ -101,9 +101,15 @@ namespace Umbraco.Tests.TestHelpers
|
||||
[TearDown]
|
||||
public virtual void TearDown()
|
||||
{
|
||||
DatabaseContext.Database.Dispose();
|
||||
//reset the app context
|
||||
ApplicationContext.ApplicationCache.ClearAllCache();
|
||||
if (ApplicationContext != null)
|
||||
{
|
||||
if (DatabaseContext != null && DatabaseContext.Database != null)
|
||||
{
|
||||
DatabaseContext.Database.Dispose();
|
||||
}
|
||||
//reset the app context
|
||||
ApplicationContext.ApplicationCache.ClearAllCache();
|
||||
}
|
||||
|
||||
SqlSyntaxContext.SqlSyntaxProvider = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user