feat(wxads): 升级公共组件

This commit is contained in:
Fu Diwei
2022-01-21 09:53:46 +08:00
parent 7205686f71
commit 9b434632d7
10 changed files with 127 additions and 92 deletions

View File

@@ -8,8 +8,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.UnitTests
{
static TestConfigs()
{
// NOTICE: 请在项目根目录下按照 appsettings.json 的格式新建 appsettings.local.json 填入测试参数。
// WARN: 敏感信息请不要提交到 git
// NOTICE: 请在项目根目录下按照 appsettings.json 的格式新建 appsettings.local.json 填入测试参数。
// WARNING: 请在 DEBUG 模式下运行测试用例。
// WARNING: 敏感信息请不要提交到 git
try
{
@@ -17,13 +18,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.UnitTests
using var jdoc = JsonDocument.Parse(stream);
var config = jdoc.RootElement.GetProperty("TestConfig");
WechatAgencyId = config.GetProperty("AgencyId").GetString();
WechatAgencyAppId = config.GetProperty("AgencyAppId").GetString();
WechatAgencyApiKey = config.GetProperty("AgencyApiKey").GetString();
WechatAccessToken = config.GetProperty("AccessToken").GetString();
WechatAgencyId = config.GetProperty("AgencyId").GetString()!;
WechatAgencyAppId = config.GetProperty("AgencyAppId").GetString()!;
WechatAgencyApiKey = config.GetProperty("AgencyApiKey").GetString()!;
WechatAccessToken = config.GetProperty("AccessToken").GetString()!;
ProjectSourceDirectory = jdoc.RootElement.GetProperty("ProjectSourceDirectory").GetString();
ProjectTestDirectory = jdoc.RootElement.GetProperty("ProjectTestDirectory").GetString();
ProjectSourceDirectory = jdoc.RootElement.GetProperty("ProjectSourceDirectory").GetString()!;
ProjectTestDirectory = jdoc.RootElement.GetProperty("ProjectTestDirectory").GetString()!;
}
catch (Exception ex)
{