26 lines
973 B
C#
26 lines
973 B
C#
using RecordBot.Services;
|
|
using Xunit;
|
|
|
|
namespace RecordBot.Tests;
|
|
|
|
public class DashScopeImageEndpointTests
|
|
{
|
|
[Theory]
|
|
[InlineData(
|
|
"https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
"https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation")]
|
|
[InlineData(
|
|
"https://dashscope.aliyuncs.com/compatible-mode/v1/",
|
|
"https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation")]
|
|
[InlineData(
|
|
"https://dashscope.aliyuncs.com/api/v1",
|
|
"https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation")]
|
|
[InlineData(
|
|
"",
|
|
"https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation")]
|
|
public void ResolveDashScopeImageEndpoint_FromChatBaseUrl(string baseUrl, string expected)
|
|
{
|
|
Assert.Equal(expected, QwenIntentClient.ResolveDashScopeImageEndpoint(baseUrl).ToString());
|
|
}
|
|
}
|