- Rename tests/NATS.Server.Tests -> tests/NATS.Server.Core.Tests - Update solution file, InternalsVisibleTo, and csproj references - Remove JETSTREAM_INTEGRATION_MATRIX and NATS.NKeys from csproj (moved to JetStream.Tests and Auth.Tests) - Update all namespaces from NATS.Server.Tests.* to NATS.Server.Core.Tests.* - Replace private GetFreePort/ReadUntilAsync helpers with TestUtilities calls - Fix stale namespace in Transport.Tests/NetworkingGoParityTests.cs
17 lines
486 B
C#
17 lines
486 B
C#
using NATS.Server.Subscriptions;
|
|
|
|
namespace NATS.Server.Core.Tests;
|
|
|
|
public class SubListMatchBytesTests
|
|
{
|
|
[Fact]
|
|
public void MatchBytes_matches_subject_without_string_allocation_and_respects_remote_filter()
|
|
{
|
|
using var sl = new SubList();
|
|
sl.MatchBytes("orders.created"u8).PlainSubs.Length.ShouldBe(0);
|
|
|
|
sl.Insert(new Subscription { Subject = "orders.*", Sid = "1" });
|
|
sl.MatchBytes("orders.created"u8).PlainSubs.Length.ShouldBe(1);
|
|
}
|
|
}
|