mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 23:13:40 +08:00
update OpenAuth.App/Test/TestBase.cs.
This commit is contained in:
parent
75ceea1652
commit
9cb5214a06
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Autofac.Extensions.DependencyInjection;
|
using Autofac.Extensions.DependencyInjection;
|
||||||
@ -27,7 +27,7 @@ namespace OpenAuth.App.Test
|
|||||||
serviceCollection.AddOptions();
|
serviceCollection.AddOptions();
|
||||||
//读取OpenAuth.WebApi的配置文件用于单元测试
|
//读取OpenAuth.WebApi的配置文件用于单元测试
|
||||||
var path = AppContext.BaseDirectory;
|
var path = AppContext.BaseDirectory;
|
||||||
int pos = path.IndexOf("OpenAuth.App");
|
int pos = path.LastIndexOf("OpenAuth.");
|
||||||
var basepath = Path.Combine(path.Substring(0,pos) ,"OpenAuth.WebApi");
|
var basepath = Path.Combine(path.Substring(0,pos) ,"OpenAuth.WebApi");
|
||||||
IConfiguration config = new ConfigurationBuilder()
|
IConfiguration config = new ConfigurationBuilder()
|
||||||
.SetBasePath(basepath)
|
.SetBasePath(basepath)
|
||||||
|
Loading…
Reference in New Issue
Block a user