单元测试:MySQL条件下测试失败

This commit is contained in:
Argo-Surface 2019-01-20 17:17:22 +08:00
parent d209d30f05
commit 2f8f3a32f4
1 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,7 @@ namespace UnitTest
#if MySQL
builder.ConfigureAppConfiguration(app => app.AddInMemoryCollection(new KeyValuePair<string, string>[] {
new KeyValuePair<string, string>("DB:0:Enabled", "false"),
new KeyValuePair<string, string>("DB:1:Enabled", "false"),
new KeyValuePair<string, string>("DB:2:Enabled", "true"),
new KeyValuePair<string, string>("DB:2:ConnectionStrings:ba", MySqlConnectionString)
}));
@ -88,6 +89,8 @@ namespace UnitTest
#if Npgsql
builder.ConfigureAppConfiguration(app => app.AddInMemoryCollection(new KeyValuePair<string, string>[] {
new KeyValuePair<string, string>("DB:0:Enabled", "false"),
new KeyValuePair<string, string>("DB:1:Enabled", "false"),
new KeyValuePair<string, string>("DB:2:Enabled", "false"),
new KeyValuePair<string, string>("DB:3:Enabled", "true"),
new KeyValuePair<string, string>("DB:3:ConnectionStrings:ba", NpgSqlConnectionString)
}));