mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 01:58:14 +08:00
feat(openai): 重命名 "WechatOpenAI" → "WechatChatbot"
This commit is contained in:
@@ -19,11 +19,15 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests
|
||||
{
|
||||
var options = new TypeDeclarationAnalyzerOptions()
|
||||
{
|
||||
SdkAssembly = Assembly.GetAssembly(typeof(WechatOpenAIClient))!,
|
||||
SdkAssembly = Assembly.GetAssembly(typeof(WechatChatbotClient))!,
|
||||
SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.OpenAI.Models",
|
||||
SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.OpenAI.Models",
|
||||
SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.OpenAI",
|
||||
SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.OpenAI.Events",
|
||||
IgnoreRequestModelTypes = (type) => !typeof(WechatChatbotRequest).IsAssignableFrom(type),
|
||||
IgnoreResponseModelTypes = (type) => !typeof(WechatChatbotResponse).IsAssignableFrom(type),
|
||||
IgnoreExecutingExtensionTypes = (type) => !type.Name.StartsWith(nameof(WechatChatbotClient)),
|
||||
IgnoreWebhookEventTypes = (type) => !typeof(WechatChatbotEvent).IsAssignableFrom(type),
|
||||
ThrowOnNotFoundRequestModelTypes = true,
|
||||
ThrowOnNotFoundResponseModelTypes = true,
|
||||
ThrowOnNotFoundExecutingExtensionTypes = true,
|
||||
@@ -39,12 +43,18 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests
|
||||
|
||||
var options = new SourceFileAnalyzerOptions()
|
||||
{
|
||||
SdkAssembly = Assembly.GetAssembly(typeof(WechatOpenAIClient))!,
|
||||
SdkAssembly = Assembly.GetAssembly(typeof(WechatChatbotClient))!,
|
||||
SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.OpenAI.Models",
|
||||
SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.OpenAI.Models",
|
||||
SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.OpenAI.Events",
|
||||
ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.Wechat.OpenAI/"),
|
||||
ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests/"),
|
||||
ProjectSourceRequestModelClassCodeSubDirectory = "Models/Chatbot/",
|
||||
ProjectSourceResponseModelClassCodeSubDirectory = "Models/Chatbot/",
|
||||
ProjectSourceWebhookEventClassCodeSubDirectory = "Events/Chatbot/",
|
||||
ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/Chatbot/",
|
||||
ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/Chatbot/",
|
||||
ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/Chatbot/",
|
||||
ThrowOnNotFoundRequestModelClassCodeFiles = true,
|
||||
ThrowOnNotFoundResponseModelClassCodeFiles = true,
|
||||
ThrowOnNotFoundExecutingExtensionClassCodeFiles = true,
|
||||
|
@@ -1,17 +0,0 @@
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests
|
||||
{
|
||||
public class TestCase_ApiExecuteMpTests
|
||||
{
|
||||
[Fact(DisplayName = "测试用例:调用 API [POST] /getbindlink/{TOKEN}")]
|
||||
public async Task TestExecuteSign()
|
||||
{
|
||||
var request = new Models.GetBindLinkRequest() { RedirectUrl = "https://example.com" };
|
||||
var response = await TestClients.Instance.ExecuteGetBindLinkAsync(request);
|
||||
|
||||
Assert.NotNull(response.LinkUrl);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +1,3 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using Xunit;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests
|
||||
|
@@ -4,7 +4,7 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests
|
||||
{
|
||||
static TestClients()
|
||||
{
|
||||
Instance = new WechatOpenAIClient(new WechatOpenAIClientOptions()
|
||||
Instance = new WechatChatbotClient(new WechatChatbotClientOptions()
|
||||
{
|
||||
AppId = TestConfigs.WechatAppId,
|
||||
Token = TestConfigs.WechatToken,
|
||||
@@ -12,6 +12,6 @@ namespace SKIT.FlurlHttpClient.Wechat.OpenAI.UnitTests
|
||||
});
|
||||
}
|
||||
|
||||
public static readonly WechatOpenAIClient Instance;
|
||||
public static readonly WechatChatbotClient Instance;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user