This commit is contained in:
Fu Diwei
2021-11-29 11:53:38 +08:00
parent 70a5a5a0b3
commit d95b1026a1
10 changed files with 15 additions and 15 deletions

View File

@@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.UnitTests
using var stream = File.OpenRead("appsettings.local.json");
using var jdoc = JsonDocument.Parse(stream);
var config = jdoc.RootElement.GetProperty("WechatConfig");
var config = jdoc.RootElement.GetProperty("TestConfig");
WechatAppId = config.GetProperty("AppId").GetString();
WechatAppSecret = config.GetProperty("AppSecret").GetString();
WechatAccessToken = config.GetProperty("AccessToken").GetString();
@@ -27,7 +27,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.UnitTests
}
catch (Exception ex)
{
throw new Exception("加载配置文件 appsettings.local.json 失败", ex);
throw new Exception("加载配置文件 appsettings.local.json 失败,请查看 `InnerException` 了解具体失败原因", ex);
}
}

View File

@@ -1,5 +1,5 @@
{
"WechatConfig": {
"TestConfig": {
"AppId": "请在此填写用于测试的微信 AppId",
"AppSecret": "请在此填写用于测试的微信 AppSecret",
"AccessToken": "请在此填写用于测试的微信 AccessToken",