20 lines
754 B
C#
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));
|
|
}
|
|
}
|