mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
test
This commit is contained in:
parent
70a5a5a0b3
commit
d95b1026a1
@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.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");
|
||||
WechatAgencyId = config.GetProperty("AgencyId").GetString();
|
||||
WechatAgencyAppId = config.GetProperty("AgencyAppId").GetString();
|
||||
WechatAgencyApiKey = config.GetProperty("AgencyApiKey").GetString();
|
||||
@ -27,7 +27,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.UnitTests
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception("加载配置文件 appsettings.local.json 失败", ex);
|
||||
throw new Exception("加载配置文件 appsettings.local.json 失败,请查看 `InnerException` 了解具体失败原因", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"WechatConfig": {
|
||||
"TestConfig": {
|
||||
"AgencyId": "请在此填写用于测试的微信广告 AgencyId",
|
||||
"AgencyAppId": "请在此填写用于测试的微信广告 AgencyAppId",
|
||||
"AgencyApiKey": "请在此填写用于测试的微信广告 AgencyApiKey",
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"WechatConfig": {
|
||||
"TestConfig": {
|
||||
"AppId": "请在此填写用于测试的微信 AppId",
|
||||
"AppSecret": "请在此填写用于测试的微信 AppSecret",
|
||||
"AccessToken": "请在此填写用于测试的微信 AccessToken",
|
||||
|
@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.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");
|
||||
WechatClientId = config.GetProperty("ClientId").GetString();
|
||||
WechatClientKey = config.GetProperty("ClientKey").GetString();
|
||||
WechatAppId = config.GetProperty("AppId").GetString();
|
||||
@ -29,7 +29,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception("加载配置文件 appsettings.local.json 失败", ex);
|
||||
throw new Exception("加载配置文件 appsettings.local.json 失败,请查看 `InnerException` 了解具体失败原因", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"WechatConfig": {
|
||||
"TestConfig": {
|
||||
"ClientId": "请在此填写用于测试的微信智能对话 ClientId",
|
||||
"ClientKey": "请在此填写用于测试的微信智能对话 ClientKey",
|
||||
"AppId": "请在此填写用于测试的微信智能对话 AppId",
|
||||
|
@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.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();
|
||||
WechatMerchantId = config.GetProperty("MerchantId").GetString();
|
||||
WechatMerchantSecret = config.GetProperty("MerchantSecret").GetString();
|
||||
@ -29,7 +29,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception("加载配置文件 appsettings.local.json 失败", ex);
|
||||
throw new Exception("加载配置文件 appsettings.local.json 失败,请查看 `InnerException` 了解具体失败原因", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"WechatConfig": {
|
||||
"TestConfig": {
|
||||
"AppId": "请在此填写用于测试的微信 AppId",
|
||||
"MerchantId": "请在此填写用于测试的微信商户号",
|
||||
"MerchantSecret": "请在此填写用于测试的微信商户 API v3 密钥",
|
||||
|
@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.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");
|
||||
WechatCorpId = config.GetProperty("CorpId").GetString();
|
||||
WechatAgentId = int.Parse(config.GetProperty("AgentId").GetString());
|
||||
WechatAgentSecret = config.GetProperty("AgentSecret").GetString();
|
||||
@ -26,7 +26,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception("加载配置文件 appsettings.local.json 失败", ex);
|
||||
throw new Exception("加载配置文件 appsettings.local.json 失败,请查看 `InnerException` 了解具体失败原因", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"WechatConfig": {
|
||||
"TestConfig": {
|
||||
"CorpId": "请在此填写用于测试的企业微信 CorpId",
|
||||
"AgentId": "请在此填写用于测试的企业微信 AgentId",
|
||||
"AgentSecret": "请在此填写用于测试的企业微信 AgentSecret"
|
||||
|
Loading…
Reference in New Issue
Block a user