Migrated ControllerContentTests.. Right now the test fails, but the test is correct

Signed-off-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Bjarke Berg
2020-06-17 16:39:28 +02:00
parent a5f5b1a984
commit 3a33e7bf29
30 changed files with 1438 additions and 611 deletions

View File

@@ -45,9 +45,14 @@ namespace Umbraco.Configuration.Models
}
}
if (builder.TryGetValue("Server", out var s) && s is string server && builder.TryGetValue("Database", out var db) && db is string database)
if (builder.TryGetValue("Server", out var s) && s is string server && !string.IsNullOrEmpty(server))
{
if (!string.IsNullOrEmpty(server) && !string.IsNullOrEmpty(database))
if (builder.TryGetValue("Database", out var db) && db is string database && !string.IsNullOrEmpty(database))
{
return Constants.DbProviderNames.SqlServer;
}
if (builder.TryGetValue("AttachDbFileName", out var a) && a is string attachDbFileName && !string.IsNullOrEmpty(attachDbFileName))
{
return Constants.DbProviderNames.SqlServer;
}