单元测试:修正手动更改json配置文件,测试用例能够成功运行,默认设定使用SQLServer连接字符串
This commit is contained in:
parent
14e5468274
commit
121c99e2a5
|
@ -64,7 +64,8 @@ namespace UnitTest
|
||||||
public static void ConfigureWebHost(IWebHostBuilder builder)
|
public static void ConfigureWebHost(IWebHostBuilder builder)
|
||||||
{
|
{
|
||||||
builder.ConfigureAppConfiguration(app => app.AddInMemoryCollection(new KeyValuePair<string, string>[] {
|
builder.ConfigureAppConfiguration(app => app.AddInMemoryCollection(new KeyValuePair<string, string>[] {
|
||||||
new KeyValuePair<string, string>("ConnectionStrings:ba", SqlConnectionStrings)
|
new KeyValuePair<string, string>("ConnectionStrings:ba", SqlConnectionStrings),
|
||||||
|
new KeyValuePair<string, string>("DB:0:Enabled", "true")
|
||||||
}));
|
}));
|
||||||
#if SQLite
|
#if SQLite
|
||||||
builder.ConfigureAppConfiguration(app => app.AddInMemoryCollection(new KeyValuePair<string, string>[] {
|
builder.ConfigureAppConfiguration(app => app.AddInMemoryCollection(new KeyValuePair<string, string>[] {
|
||||||
|
|
Loading…
Reference in New Issue