Revert C#6 notation
This commit is contained in:
@@ -110,7 +110,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
get
|
||||
{
|
||||
var att = GetType().GetCustomAttribute<DatabaseTestBehaviorAttribute>(false);
|
||||
return att?.Behavior ?? DatabaseBehavior.NoDatabasePerFixture;
|
||||
return att != null ? att.Behavior : DatabaseBehavior.NoDatabasePerFixture;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,13 +327,20 @@ namespace Umbraco.Tests.TestHelpers
|
||||
LogHelper.Error<BaseDatabaseFactoryTest>("Could not remove the old database file", ex);
|
||||
|
||||
//We will swallow this exception! That's because a sub class might require further teardown logic.
|
||||
onFail?.Invoke(ex);
|
||||
if (onFail != null)
|
||||
onFail(ex);
|
||||
}
|
||||
}
|
||||
|
||||
protected ServiceContext ServiceContext => ApplicationContext.Services;
|
||||
protected ServiceContext ServiceContext
|
||||
{
|
||||
get { return ApplicationContext.Services; }
|
||||
}
|
||||
|
||||
protected DatabaseContext DatabaseContext => ApplicationContext.DatabaseContext;
|
||||
protected DatabaseContext DatabaseContext
|
||||
{
|
||||
get { return ApplicationContext.DatabaseContext; }
|
||||
}
|
||||
|
||||
protected UmbracoContext GetUmbracoContext(string url, int templateId, RouteData routeData = null, bool setSingleton = false)
|
||||
{
|
||||
|
||||
@@ -207,9 +207,15 @@ namespace Umbraco.Tests.TestHelpers
|
||||
Resolution.Freeze();
|
||||
}
|
||||
|
||||
protected ApplicationContext ApplicationContext => ApplicationContext.Current;
|
||||
protected ApplicationContext ApplicationContext
|
||||
{
|
||||
get { return ApplicationContext.Current; }
|
||||
}
|
||||
|
||||
protected ILogger Logger => ProfilingLogger.Logger;
|
||||
protected ILogger Logger
|
||||
{
|
||||
get { return ProfilingLogger.Logger; }
|
||||
}
|
||||
|
||||
protected ProfilingLogger ProfilingLogger { get; private set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user