Files
wx-win-agent/tests/node-agent/WxAgent.Core.Tests/WechatSendConfirmationOccurrenceTests.cs
T
rogee edba7d0d38
Build web service image / build (push) Successful in 1m15s
feat: support long text and safe attachment batches
2026-09-30 09:16:36 +08:00

20 lines
754 B
C#

using WxAgent.Core;
using Xunit;
namespace WxAgent.Core.Tests;
public sealed class WechatSendConfirmationOccurrenceTests
{
[Fact]
public void IdenticalFingerprintIsNewOnlyWhenItsVisibleCountIncreases()
{
var baseline = new Dictionary<string, int> { ["same-message"] = 1 };
var unchanged = new Dictionary<string, int> { ["same-message"] = 1 };
var appended = new Dictionary<string, int> { ["same-message"] = 2 };
Assert.False(WechatSendConfirmation.IsNewOccurrence("same-message", baseline, unchanged));
Assert.True(WechatSendConfirmation.IsNewOccurrence("same-message", baseline, appended));
Assert.False(WechatSendConfirmation.IsNewOccurrence("other-message", baseline, appended));
}
}