Revert C#6 notation

This commit is contained in:
Sebastiaan Janssen
2016-07-07 16:17:01 +02:00
parent c1f6708b21
commit 05cb2050e7
2 changed files with 19 additions and 6 deletions

View File

@@ -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)
{

View File

@@ -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; }