refactor: split node agent and Go control plane
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using WxAgent.Core;
|
||||
using Xunit;
|
||||
|
||||
namespace WxAgent.Core.Tests;
|
||||
|
||||
public sealed class WechatDerivedTextTests
|
||||
{
|
||||
[Fact]
|
||||
public void OnlyAddedTextIsReturnedAndDuplicateLinesArePreserved()
|
||||
{
|
||||
Assert.Equal($"result{Environment.NewLine}result",
|
||||
WechatDerivedText.AddedText(["original", "timestamp"], ["original", "timestamp", "result", "result"]));
|
||||
Assert.Equal("same", WechatDerivedText.AddedText(["same"], ["same", "same"]));
|
||||
Assert.Null(WechatDerivedText.AddedText(["original"], ["original"]));
|
||||
Assert.Null(WechatDerivedText.AddedText(["original"], ["unrelated replacement"]));
|
||||
Assert.Null(WechatDerivedText.AddedText(["same", "same"], ["same", "new"]));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("识别中")]
|
||||
[InlineData("转换中…")]
|
||||
[InlineData("语音转换失败")]
|
||||
[InlineData("识别失败,请重试")]
|
||||
[InlineData("未识别到文字")]
|
||||
[InlineData("无法转换")]
|
||||
[InlineData(" ")]
|
||||
public void TransientOrFailedResultsAreNotReturned(string status) =>
|
||||
Assert.Null(WechatDerivedText.AddedText(["original"], ["original", status]));
|
||||
}
|
||||
Reference in New Issue
Block a user