Implement deferred core utility parity APIs/tests and refresh tracking artifacts

This commit is contained in:
Joseph Doherty
2026-02-27 10:27:05 -05:00
parent c0aaae9236
commit b94a67be6e
17 changed files with 842 additions and 9 deletions

View File

@@ -22,6 +22,17 @@ namespace ZB.MOM.NatsNet.Server.Tests.Internal;
/// </summary>
public sealed class RateCounterTests
{
[Fact]
public void NewRateCounter_ShouldCreateWithDefaultInterval()
{
var counter = RateCounter.NewRateCounter(2);
counter.Interval.ShouldBe(TimeSpan.FromSeconds(1));
counter.Allow().ShouldBeTrue();
counter.Allow().ShouldBeTrue();
counter.Allow().ShouldBeFalse();
}
[Fact]
public async Task RateCounter_ShouldAllowUpToLimitThenBlockAndReset()
{