Files
natsdotnet/tests/NATS.Server.Tests/Gateways/GatewayInterestOnlyParityTests.cs
2026-02-23 13:08:52 -05:00

18 lines
579 B
C#

using NATS.Server.Gateways;
using NATS.Server.Subscriptions;
namespace NATS.Server.Tests;
public class GatewayInterestOnlyParityTests
{
[Fact]
public void Gateway_interest_only_mode_forwards_only_subjects_with_remote_interest()
{
using var subList = new SubList();
subList.ApplyRemoteSub(new RemoteSubscription("orders.*", null, "gw1", "A"));
GatewayManager.ShouldForwardInterestOnly(subList, "A", "orders.created").ShouldBeTrue();
GatewayManager.ShouldForwardInterestOnly(subList, "A", "payments.created").ShouldBeFalse();
}
}