This commit is contained in:
Sebastiaan Janssen
2013-05-06 11:06:54 -02:00
2 changed files with 4 additions and 4 deletions

View File

@@ -68,7 +68,7 @@ namespace Umbraco.Core.Persistence
//double check
if (_nonHttpInstance == null)
{
_nonHttpInstance = string.IsNullOrEmpty(_providerName) == false && string.IsNullOrEmpty(_providerName) == false
_nonHttpInstance = string.IsNullOrEmpty(_connectionString) == false && string.IsNullOrEmpty(_providerName) == false
? new UmbracoDatabase(_connectionString, _providerName)
: new UmbracoDatabase(_connectionStringName);
}
@@ -81,7 +81,7 @@ namespace Umbraco.Core.Persistence
if (HttpContext.Current.Items.Contains(typeof(DefaultDatabaseFactory)) == false)
{
HttpContext.Current.Items.Add(typeof (DefaultDatabaseFactory),
string.IsNullOrEmpty(_providerName) == false && string.IsNullOrEmpty(_providerName) == false
string.IsNullOrEmpty(_connectionString) == false && string.IsNullOrEmpty(_providerName) == false
? new UmbracoDatabase(_connectionString, _providerName)
: new UmbracoDatabase(_connectionStringName));
}

View File

@@ -85,8 +85,8 @@ namespace Umbraco.Tests
var originalTypesFound = TypeFinderOriginal.FindClassesOfType<IApplicationStartupHandler>(_assemblies);
Assert.AreEqual(originalTypesFound.Count(), typesFound.Count());
Assert.AreEqual(4, typesFound.Count());
Assert.AreEqual(4, originalTypesFound.Count());
Assert.AreEqual(6, typesFound.Count());
Assert.AreEqual(6, originalTypesFound.Count());
}
[Test]