mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 01:58:14 +08:00
test: 设计代码分析工具,以规避拼写错误导致的 API 定义问题
This commit is contained in:
@@ -13,16 +13,23 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.UnitTests
|
||||
|
||||
using var stream = File.OpenRead("appsettings.local.json");
|
||||
using var json = JsonDocument.Parse(stream);
|
||||
|
||||
var config = json.RootElement.GetProperty("WechatConfig");
|
||||
WechatAppId = config.GetProperty("AppId").GetString();
|
||||
WechatAppSecret = config.GetProperty("AppSecret").GetString();
|
||||
WechatAccessToken = config.GetProperty("AccessToken").GetString();
|
||||
WechatOpenId = config.GetProperty("OpenId").GetString();
|
||||
|
||||
ProjectSourceDirectory = json.RootElement.GetProperty("ProjectSourceDirectory").GetString();
|
||||
ProjectTestDirectory = json.RootElement.GetProperty("ProjectTestDirectory").GetString();
|
||||
}
|
||||
|
||||
public static readonly string WechatAppId;
|
||||
public static readonly string WechatAppSecret;
|
||||
public static readonly string WechatAccessToken;
|
||||
public static readonly string WechatOpenId;
|
||||
|
||||
public static readonly string ProjectSourceDirectory;
|
||||
public static readonly string ProjectTestDirectory;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user